mGBA config, split backup into root/home

This commit is contained in:
2019-07-08 03:22:24 -04:00
parent 413ffb53db
commit 046d0dfa42
10 changed files with 299 additions and 21 deletions

View File

@@ -15,15 +15,17 @@ exclude_dirs_list="/home/kevin/txt/exclude-dirs-backup.txt"
exclude_dirs_list_full="/home/kevin/txt/exclude-dirs-backup-full.txt"
case $2 in
tar )
tar-root )
# Labels for backup name
distro="arch"
datetime=$(date "+%m.%d-%H.%M")
backup_file="$backup_dest/tar/$datetime-$distro.tar.gz"
backup_file="$backup_dest/tar/$datetime-$distro-root.tar.gz"
sudo tar -czpvf "$backup_file" --exclude-from="$exclude_dirs_list" /
sudo tar -czpvf "$backup_file" --exclude-from="$exclude_dirs_list" --exclude=/home /
;;
full )
sudo rsync -PraAX --exclude-from="$exclude_dirs_list_full" / "$backup_dest/full"
# sudo rsync -PraAX /home "$backup_dest/full"
;;
home )
sudo rsync -PraAX --exclude-from="$exclude_dirs_list_full" /home "$backup_dest/full"
esac