arch/roles/dots/files/home/create_hot_backup.sh
2025-02-18 01:36:51 +06:00

25 lines
571 B
Bash
Executable File

#!/bin/bash
if [ $1 = "backup" ]
then
backup_name=$(date +"%m-%d")"_hot.tar.gz"
tar cf - \
/home/fs/Desktop/work \
/home/fs/Desktop/a79 \
/home/fs/Desktop/pet \
/home/fs/Documents \
/home/fs/.pass \
/home/fs/tt \
/home/fs/.mozilla/ \
/home/fs/.local/nvim \
/home/fs/.cache/nvim \
/home/fs/vpn \
/home/fs/suckless \
/home/fs/.local/DBeaverData | pigz > "/home/fs/backups/$backup_name"
fi
if [ $1 = "restore" ]
then
tar --use-compress-program=pigz -xf $2 -C /
fi