#!/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