I do a daily backup, but after my upgrade to Disco Dingo, I've been getting random errors.
I use this simple backup script that I made that does the backups (Essentially just does incremental backups with a certain file naming structure to an external drive called "sentinel"):
I use this simple backup script that I made that does the backups (Essentially just does incremental backups with a certain file naming structure to an external drive called "sentinel"):
Code:
#!/bin/bash #Author: Sarah Szabo <SarahSzabo@Protonmail.com> #Creation Date: 19/03/2019 #Version: 1 printf "%s\n\n" "About to Create Snapshots..." now="$(date +%d-%m-%Y) $(date +%X)" #Prefixes fsPrefix="/media/sarah" systemPrefix="$fsPrefix/Snapshots/System Backups" homePrefix="$fsPrefix/Snapshots/Sarah Backups" convergentRefugePrefix="$fsPrefix/ConvergentRefuge/Snapshots/Convergent Refuge" #Subvolume Names fsname="$fsPrefix/Lesser Ark Root" system="$systemPrefix/System $now" home="$homePrefix/Sarah $now" convergentRefuge="$convergentRefugePrefix/Convergent Refuge $now" sudo mkdir -p "$fsname" "$systemPrefix" "$homePrefix" "$convergentRefugePrefix" sudo mount /dev/sdc2 "$fsname" printf "%s\n\n" "Filesystem Mounted on $fsname" #printf "sudo btrfs subvolume snapshot -r %s %s\n\n" "$fsname/@" "$system" sudo btrfs subvolume snapshot -r "$fsname/@" "$system" sudo btrfs subvolume snapshot -r "$fsname/@home" "$home" sudo btrfs subvolume snapshot -r "/media/sarah/ConvergentRefuge/Convergent Refuge" "$convergentRefuge" printf "%s\n\n" "Snapshots Taken!" #New Snapshots Or Old Ones? read -p "Are we doing new snapshots, or going off old ones? (Enter New/Old): " newstatus if [[ "$newstatus" == "Old" ]]; then #Send System Folder to SENTINEL printf "%s\n\n" "Date Options Display:" ls "$homePrefix" read -p "Enter Previous Backup Filename (Just Date/Time): " filename sudo btrfs send -p "$systemPrefix/System $filename" "$system" | sudo btrfs receive /media/sarah/SENTINEL/Kubuntu\ Backups/System\ Backups printf "\n%s\n\n" "Root System Backed Up" #Send Home folder sudo btrfs send -p "$homePrefix/Sarah $filename" "$home" | sudo btrfs receive /media/sarah/SENTINEL/Kubuntu\ Backups/Sarah\ Backups printf "\n%s\n\n" "Sarah's Home Folder Backed Up" #Send Convergent Refuge Folder sudo btrfs send -p "$convergentRefugePrefix/Convergent Refuge $filename" "$convergentRefuge" | sudo btrfs receive /media/sarah/SENTINEL/Kubuntu\ Backups/Convergent\ Refuge\ Backups printf "\n%s\n\n" "Convergent Refuge Backed Up" printf "\n%s\n\n" "Backing Up Complete" else #Send System Folder to SENTINEL sudo btrfs send "$system" | sudo btrfs receive /media/sarah/SENTINEL/Kubuntu\ Backups/System\ Backups printf "\n%s\n\n" "Root System (NEW) Backed Up" #Send Home folder sudo btrfs send "$home" | sudo btrfs receive /media/sarah/SENTINEL/Kubuntu\ Backups/Sarah\ Backups printf "\n%s\n\n" "Sarah's Home Folder (NEW) Backed Up" #Send Convergent Refuge Folder sudo btrfs send "$convergentRefuge" | sudo btrfs receive /media/sarah/SENTINEL/Kubuntu\ Backups/Convergent\ Refuge\ Backups printf "\n%s\n\n" "Convergent Refuge (NEW) Backed Up" printf "\n%s\n\n" "Backing Up Complete" fi
Comment