something I have not grasped as yet ,,,,,,is Killing this @hear .
yesterday it was almost working ,,,,I would rite click a subvolume click the "take a subvolume snapshot" service menu , and get the kdialog password prompt enter my password and then get the kdialog saying the snapshot was created ,,,when it was NOT ,,,,,,but that just means the script was running as it dose not actually check just reply that { "Snapshot of $source made as $target" }and gave the correct $source and $target ,,,,,,it was like the line { echo -e $PASSWD | sudo -S btrfs su sn "$source" "$target" } was not getting ran.
TODAY ,,,they(the scripts) will not even run ...I see somthing it the task bar for 1 second ,,,,,then nothing ,,,no password prompt ,,,nothing.
hears where I am
snapshot-manager.desktop,,,,,,,,,,,,,,,,,,,,,
snapshot_subvol text
the subvolumes are in the 1TB drive mounted at /mnt/btrfs at boot with this line in /etc/fstab,,,,,,,,,,,,,,,,,
if I do a,,,,,,,,,
the snapshot gets created ,,,,,,and sudo gives a popup for the password because of the -A switch .
I just got home from work ,,,and tired ,,,must get food ,,,,,,,
VINNY
yesterday it was almost working ,,,,I would rite click a subvolume click the "take a subvolume snapshot" service menu , and get the kdialog password prompt enter my password and then get the kdialog saying the snapshot was created ,,,when it was NOT ,,,,,,but that just means the script was running as it dose not actually check just reply that { "Snapshot of $source made as $target" }and gave the correct $source and $target ,,,,,,it was like the line { echo -e $PASSWD | sudo -S btrfs su sn "$source" "$target" } was not getting ran.
TODAY ,,,they(the scripts) will not even run ...I see somthing it the task bar for 1 second ,,,,,then nothing ,,,no password prompt ,,,nothing.
hears where I am
Code:
vinny@vinny-Bonobo-Extreme:~/.local/share/kservices5/ServiceMenus$ ls -la total 16 drwxrwxr-x 3 vinny vinny 4096 Sep 25 16:44 . drwxrwxr-x 3 vinny vinny 4096 Sep 23 14:47 .. -rwxr-xr-x 1 vinny vinny 783 Sep 25 16:44 snapshot-manager.desktop drwxrwxr-x 2 vinny vinny 4096 Sep 25 16:42 snapshot_manager-scripts
Code:
vinny@vinny-Bonobo-Extreme:~/.local/share/kservices5/ServiceMenus/snapshot_manager-scripts$ ls -la total 20 drwxrwxr-x 2 vinny vinny 4096 Sep 25 16:42 . drwxrwxr-x 3 vinny vinny 4096 Sep 25 16:44 .. -rwxr-xr-x 1 vinny vinny 1031 Sep 25 16:36 delete_subvol -rwxr-xr-x 1 vinny vinny 316 Sep 25 16:42 is_subvol -rwxr-xr-x 1 vinny vinny 728 Sep 25 16:34 snapshot_subvol
Code:
[Desktop Entry] Type=Service Actions=issubvol;_SEPARATOR_;takesnapshot;deletesubvol X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory MimeType=inode/directory; X-KDE-StartupNotify=false X-KDE-Priority=TopLevel X-KDE-Submenu=Manage BTRFS Subvolumes [Desktop Action issubvol] Icon=question Name=Is this a BTRFS Subvolume Exec=/home/vinny/.local/share/kservices5/ServiceMenus/snapshot_manager-scripts/is_subvol %U [Desktop Action takesnapshot] Icon=camera-photo Name=Take a Subvolume Snapshot Exec=/home/vinny/.local/share/kservices5/ServiceMenus/snapshot_manager-scripts/snapshot_subvol %U [Desktop Action deletesubvol] Icon=user-trash-full Name=Permanently Delete a Subvolume Exec=/home/vinny/.local/share/kservices5/ServiceMenus/snapshot_manager-scripts/delete_subvol %U
Code:
#!/bin/bash# snapshot_subvol source="$1" target="$1"_`date +%y%m%d-%H%M%S` # get the sudo password PASSWD="$(kdialog --password "This task requires SUDO access. Enter your password: ")" #allow cancel to exit cleanly if [ -z "$PASSWD" ]; then kdialog --passivepopup "Snapshot cancelled" 6 exit 0; fi #validate target is actually a btrfs subvolume and exit if not if [[ "$(stat -f --format="%T" "$source")" -ne "btrfs" ]] || [[ "$(stat --format="%i" "$source")" -ne 256 ]] then kdialog --error "Sorry, Not a BTRFS Subvolume" exit 0 fi #take the snapshot, passively notify, and exit echo -e $PASSWD | sudo -S btrfs su sn "$source" "$target" kdialog --passivepopup "Snapshot of $source made as $target" 6 exit 0
Code:
#TB-drive /dev/sdb1 /mnt/btrfs btrfs rw,relatime,space_cache,compress=lzo 0 0
Code:
vinny@vinny-Bonobo-Extreme:/mnt/btrfs$ sudo -A btrfs sub snap @home/ /mnt/btrfs/@home-snap
Code:
vinny@vinny-Bonobo-Extreme:~$ ls -la /mnt/btrfs total 8 drwxr-xr-x 1 root root 118 Sep 24 01:55 . drwxr-xr-x 4 root root 4096 Aug 22 22:08 .. drwxr-xr-x 1 root root 184 Dec 17 2016 @ drwxr-xr-x 1 root root 30 Dec 17 2016 @home drwxr-xr-x 1 root root 30 Dec 17 2016 @home-snap drwxr-xr-x 1 vinny vinny 194 Jul 26 22:57 kubuntu drwxr-xr-x 1 root root 60 Dec 17 2016 ubiquity-apt-clone drwxr-xr-x 1 root root 6 Dec 17 2016 var -rw-rw-r-- 1 vinny vinny 2 Jan 28 2016 .windows-serial
VINNY
Comment