mGBA config, split backup into root/home
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user