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

    #31
    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.

    Please Read Me

    Comment


      #32
      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
      i7 4core HT 8MB L3 2.9GHz
      16GB RAM
      Nvidia GTX 860M 4GB RAM 1152 cuda cores

      Comment


        #33


        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
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #34
          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

          Please Read Me

          Comment


            #35
            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
            i7 4core HT 8MB L3 2.9GHz
            16GB RAM
            Nvidia GTX 860M 4GB RAM 1152 cuda cores

            Comment


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

              Please Read Me

              Comment


                #37
                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
                i7 4core HT 8MB L3 2.9GHz
                16GB RAM
                Nvidia GTX 860M 4GB RAM 1152 cuda cores

                Comment


                  #38
                  Worked for me, too, after I changed "dl=0" to "dl=1"
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #39
                    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
                    i7 4core HT 8MB L3 2.9GHz
                    16GB RAM
                    Nvidia GTX 860M 4GB RAM 1152 cuda cores

                    Comment


                      #40
                      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
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #41
                        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.

                        Please Read Me

                        Comment


                          #42
                          Old thread, but I decided to put this service menu up on the KDE Store:

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

                          Please Read Me

                          Comment


                            #43
                            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.
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment


                              #44
                              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?

                              Please Read Me

                              Comment


                                #45
                                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.
                                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                                – John F. Kennedy, February 26, 1962.

                                Comment

                                Working...
                                X