Announcement

Collapse
No announcement yet.

BTRFS subvolume handling through a service menu

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GreyGeek
    replied
    Originally posted by oshunluvr View Post
    Snapshots must be on the same file system as the source. I didn't want a convoluted mess of tracking what goes where so the default is create the subvolume in the same location as source subvolume. Here, I have my root file system mounted as /subvol. Navigating to /subvol and selecting "Take a snapshot" results in the snapshot in the same location.
    Of course, and mounting /dev/sda1 to /mnt makes it part of the "same file system" as the other directories and subvolumes.

    Originally posted by oshunluvr View Post
    Are you seeing something different?
    Don't know. Exactly what do you right click on when you want to make a root snapshot? Not /root.

    What I see in the right panel when I click on "root" in the "Places" panel is every other folder under "/", but no folder in the right panel with "/". IOW, I cannot click on "/" in the right panel in order to create a root snapshot. So, I click on an empty area next to some file and your script equates it to clicking on "/", I guess.

    Leave a comment:


  • oshunluvr
    replied
    Snapshots must be on the same file system as the source. I didn't want a convoluted mess of tracking what goes where so the default is create the subvolume in the same location as source subvolume. Here, I have my root file system mounted as /subvol. Navigating to /subvol and selecting "Take a snapshot" results in the snapshot in the same location.

    Are you seeing something different?

    Leave a comment:


  • GreyGeek
    replied
    Downloaded it, installed it. Tried it.
    Taking a snapshot of /home was easy. Deleting it was easy.
    Taking a snapshot of / wasn't as clear. Using /root wasn't it, of course, so I right clicked on an empty area in the listing of files under "/", since "/" wasn't in the directory listing in the right panel, and your submenu options appeared. Testing that empty area verified that it was a btrfs subvolume, .i.e., it was checking "/". So, I clicked on the "Create RO subvolume" on it and "_ro_20180213_130538" appeared in the tree. Checking both snapshots showed that they contained the right directories and files. I then selected each one and used the delete option to delete them. It all worked perfectly.

    The only nit I have is that the snapshots were stored under "/" and "/home", and thus accessible using a file manager or the Konsole. This is the way "Snapper" treated them, except that it made them hidden. Normally, when a snapshot is taken of "/" (@) the "/home" (@home) subvolume in the snapshot is empty. It works that way with your script as well, as you would surmise. I did notice that when I created a second "/" snapshot and deleted it the "_ro_..." directory did not disappear as it did the first time, but the ghost tested as NOT a subvolume. Closing Dolphin and re-opening it allowed the ghost to disappear.

    My preference is to use a root Konsole to
    mount /dev/sda1 /mnt
    which exposes
    /mnt/@
    /mnt/@home
    and the directory where I store my snapshots:
    /mnt/snapshots
    Then I use
    btrfs su snapshot -r /mnt/@ /mnt/snapshots/@_YYYYMMDD
    btrfs su snapshot -r /mnt/@home /mnt/snapshots/@home_YYYYMMDD
    to create the two snapshots.
    IF I want to create off HD storage I mount my third HD
    mount /dev/sdb1 /backup
    and do a send-receive to it
    btrfs send /mnt/snapshots/@_YYYYMMDD | btrfs receive /backup
    btrfs send /mnt/snapshots/@home_YYYYMMDD | btrfs receive /backup

    If I want to delete a snapshot I use
    btrfs subvol delete -C /mnt/snapshots/@_YYYYMMDD
    etc...

    I then got to thinking about rollbacks using the snapshots your scripts generate.
    My first try (but haven't tried it) would be to rename "/home" to "/home_old" or
    mv /home /home_old
    and then
    mv /home_ro_YYYYMMDD_HHMMSS /home
    and log out and log back in.

    For rolling back root I'm not so clear.
    mv / /old
    and
    mv _ro_YYYYMMDD_HHMMSS /
    and reboot.


    Once I figure that out I can see using your scripts to make temp snapshots just before a big update or change of some kind, and being able to quickly roll back if things don't work out. Either way, the snapshots would be quickly erased.
    Last edited by GreyGeek; Feb 13, 2018, 01:40 PM.

    Leave a comment:


  • oshunluvr
    replied
    Old thread, but I decided to put this service menu up on the KDE Store:

    https://www.opendesktop.org/p/1214134/

    Leave a comment:


  • oshunluvr
    replied
    Interesting. @here, I get "unable to preview" but am presented with a Download button.

    Dropbox has changed the way their website functions quite a bit lately.

    Leave a comment:


  • GreyGeek
    replied
    BTRFS subvolume handling through a service menu

    LOL!

    When I clicked on Oshunluver’s link it opened Dropbox but presented an empty page and did nothing else. I backed the zero out and replaced it with a one and hit the Enter key. It immediately downloaded the package but the webpage was still empty.
    I have a DropBox account but the link did not open it.
    Anyway, DL=false didn’t download the package but dl =true did.


    Sent from my iPhone using Tapatalk

    Leave a comment:


  • vinnywright
    replied
    Originally posted by GreyGeek View Post
    Worked for me, too, after I changed "dl=0" to "dl=1"
    ? Humm I wander why that was ?

    and you should be more descriptive in your replies (forum 101,,,you get a FAIL and have extra home work ),,,,I searched through the scripts for a "dl=0" for 10 min before I thought to look at the dropbox URL

    VINNY

    Leave a comment:


  • GreyGeek
    replied
    Worked for me, too, after I changed "dl=0" to "dl=1"

    Leave a comment:


  • vinnywright
    replied
    Originally posted by oshunluvr View Post
    Vin, here's the latest full set with icons included: https://www.dropbox.com/s/vcq90apim3...us.tar.gz?dl=0
    you are the MAN ...a very nice drop in replacement for my ServiceMenus directory , works perfect

    the dropbox link let me just add it to my dropbox and BAM their it was in my ~/Dropbox directory ,,,,,,, so nice

    thank you very much !

    VINNY

    Leave a comment:


  • oshunluvr
    replied
    Vin, here's the latest full set with icons included: https://www.dropbox.com/s/vcq90apim3...us.tar.gz?dl=0

    Leave a comment:


  • vinnywright
    replied
    Originally posted by oshunluvr View Post
    Glad you like it Vin.

    I'm using kdialog for the prompts, kdialog --passive-popup for less important messages, and notify-send for more important ones - like send|receive complete and deletion of a subvol.

    I even took the Breeze icons and made a set for me to use with these menu item and notify-send;

    [ATTACH=CONFIG]7186[/ATTACH]
    nice ,,,I like the purple ,,,,that would go nicely on my Neon-LTS.

    VINNY

    Leave a comment:


  • oshunluvr
    replied
    Glad you like it Vin.

    I'm using kdialog for the prompts, kdialog --passive-popup for less important messages, and notify-send for more important ones - like send|receive complete and deletion of a subvol.

    I even took the Breeze icons and made a set for me to use with these menu item and notify-send;

    Click image for larger version

Name:	Screenshot_20170930_131800.png
Views:	1
Size:	19.3 KB
ID:	643640

    Leave a comment:


  • vinnywright
    replied


    didn't get back to this till just now ,,,,to add your "notify-send" edits nice ,,,,just had to put up the screen shot

    curiously the Neon-frankenbuntu-(Kubuntu-16.04 with the neon-dev/stable) had it (the notify-send) installed already.

    Vinny's loving @oshunluvr's scripts for btrfs snapshot handling in dolphin ,,,,,,,,, thank you Sr.

    VINNY

    Leave a comment:


  • vinnywright
    replied
    Originally posted by oshunluvr View Post
    Here's what I wanted:

    notify-send -t 0 -i "dialog-ok" "message here"

    I knew there was I way to do it, I just couldn't remember.
    Aaaa nice ,,,,but @hear on the Neon-LTS install

    Code:
    vinny@vinny-Bonobo-Extreme:~$ notify-send -t 0 -i "dialog-ok" "message here"
    The program 'notify-send' is currently not installed. You can install it by typing:
    sudo apt install libnotify-bin
    and after installing it ,,,it works as expected

    VINNY

    Leave a comment:


  • oshunluvr
    replied
    Here's what I wanted:

    notify-send -t 0 -i "dialog-ok" "message here"

    I knew there was I way to do it, I just couldn't remember.

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X