All this is just some evidence that btrfs is possibly not always useful for us mere mortal Desktop users
LOL.
LOL.$ [B]sudo snapper -c root list[/B] # | Type | Pre # | Date | User | Cleanup | Description | Userdata ---+--------+-------+---------------------------------+-------+---------+--------------------+--------- 0 | single | | | root | | current | 1 | single | | Thu 30 Apr 2020 10:02:29 PM CDT | jerry | | single following 0 | 2 | pre | | Thu 30 Apr 2020 10:28:31 PM CDT | root | number | apt | 3 | post | 2 | Thu 30 Apr 2020 10:28:32 PM CDT | root | number | apt | 4 | single | | Fri 01 May 2020 10:40:52 AM CDT | root | number | boot |
[B]$ sudo snapper -c home list[/B] # | Type | Pre # | Date | User | Cleanup | Description | Userdata ---+--------+-------+---------------------------------+-------+---------+--------------------+--------- 0 | single | | | root | | current | 1 | single | | Thu 30 Apr 2020 10:02:54 PM CDT | jerry | | single following 0 |
[B]$ sudo snapper -c root list[/B] # | Type | Pre # | Date | User | Cleanup | Description | Userdata ---+--------+-------+---------------------------------+-------+---------+--------------------+--------- 0 | single | | | root | | current | 1 | single | | Thu 30 Apr 2020 10:02:29 PM CDT | jerry | | single following 0 | 2 | pre | | Thu 30 Apr 2020 10:28:31 PM CDT | root | number | apt | 3 | post | 2 | Thu 30 Apr 2020 10:28:32 PM CDT | root | number | apt | 4 | single | | Fri 01 May 2020 10:40:52 AM CDT | root | number | boot | [COLOR=#ff0000]5 [/COLOR] | pre | | Fri 01 May 2020 12:23:49 PM CDT | root | number | apt | [COLOR=#ff0000]6[/COLOR] | post | 5 | Fri 01 May 2020 12:23:52 PM CDT | root | number | apt |
#!/bin/bash
# created by Jerry L Kreps on July 20, 2015 and released under the GPL 2.0.
# This script merely creates a snapshot in both root and home with the designation
# of PRE or POST as the type, which indicates that the user created it before an
# action or afterwards.
# This script is run with PRE as the TYPE before an action which you may want to reverse
# AND this script run again with POST as the TYPE after that action has been completed. Both snapshots are singletons because
# no timeline is used. Only the "PRE" or"POST" in the description, along with a timestamp,
# links the pre to the post snapshot.
# To reverse the action run the following two snapper commands:
#
# snapper -c home udochange n..m
# sudo snapper -c root undochange o..p
#
# where n or o is the number of the PRE and m or p is # the number of the POST snapshot
#
# or
#
# sudo snapper -c home rollback n
# sudo snapper -c root rollback o
#
# and rebooting after either method.
#
# After running those two commands both of the empty snapshots folders can be deleted using
#
# snapper -c home delete n-m
# sudo snapper -c root delete o-p
#
#
# actual program starts here
NOW=$(date +%Y%m%d%H%M)
echo Enter snapshot type PRE or POST:
read TYPE
echo Enter description
read DESC
STR=$TYPE" "$DESC" "$NOW
echo $STR
HCMD='snapper -c home create -d "'${STR}'"'
RCMD='sudo snapper -c root create -d "'${STR}'"'
eval "$HCMD"
eval "$RCMD"
There are 0 users viewing this topic.
Comment