This commit is contained in:
James Barnett
2016-09-24 15:14:44 -05:00
parent a9dd8a29ae
commit b26ed560e2

8
backup
View File

@@ -71,10 +71,6 @@ for x in $SNAPPER_CONFIGS; do
# shellcheck source=/dev/null # shellcheck source=/dev/null
source /etc/snapper/configs/$x source /etc/snapper/configs/$x
read -n 1 -p "Perform backup on '$x' configuration (y/n)? " do_backup
echo
if [[ $do_backup == "y" ]]; then
old_number=$(snapper -c "$x" list -t single | awk '/'"$selected_uuid"'/ {print $1}') old_number=$(snapper -c "$x" list -t single | awk '/'"$selected_uuid"'/ {print $1}')
new_number=$(snapper -c "$x" create --print-number) new_number=$(snapper -c "$x" create --print-number)
@@ -82,6 +78,7 @@ for x in $SNAPPER_CONFIGS; do
new_snapshot=$SUBVOLUME/.snapshots/$new_number/snapshot new_snapshot=$SUBVOLUME/.snapshots/$new_number/snapshot
new_info=$SUBVOLUME/.snapshots/$new_number/info.xml new_info=$SUBVOLUME/.snapshots/$new_number/info.xml
echo "At '$x' configuration"
if [[ -z "$old_number" ]]; then if [[ -z "$old_number" ]]; then
@@ -144,9 +141,6 @@ for x in $SNAPPER_CONFIGS; do
# Tag new snapshot as the latest # Tag new snapshot as the latest
snapper -v -c "$x" modify -d "$description" -u "$userdata" "$new_number" snapper -v -c "$x" modify -d "$description" -u "$userdata" "$new_number"
fi
done done
date > "$HOME"/.lastbackup date > "$HOME"/.lastbackup