1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-25 20:58:37 -06:00
random/impfilesbk
2022-06-15 01:46:58 -05:00

35 lines
1.8 KiB
Bash

#!/bin/sh
# This script backs up some important stuff
# Setup location for home and backup directory
HMDIR=/home/sintan
BKDIR=/mnt/storage/sintan
echo `date` "| Backing up Documents..." | tee -a $HMDIR/TempStorage/impfilesbk.log
rsync -aAXH --delete --stats $HMDIR/Documents/ $BKDIR/Documents/ | tee -a $HMDIR/TempStorage/impfilesbk.log
echo $'\n'`date` "| Done!" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo "----------" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo `date` "| Backing up Academics..." | tee -a $HMDIR/TempStorage/impfilesbk.log
rsync -aAXH --delete --stats $HMDIR/Academics/ $BKDIR/Academics/ | tee -a $HMDIR/TempStorage/impfilesbk.log
echo $'\n'`date` "| Done!" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo "----------" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo `date` "| Backing up Pictures..." | tee -a $HMDIR/TempStorage/impfilesbk.log
rsync -aAXH --delete --stats $HMDIR/Pictures/ $BKDIR/Pictures/ | tee -a $HMDIR/TempStorage/impfilesbk.log
echo $'\n'`date` "| Done!" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo "----------" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo `date` "| Backing up Zotero..." | tee -a $HMDIR/TempStorage/impfilesbk.log
rsync -aAXH --delete --stats $HMDIR/Zotero/ $BKDIR/Zotero/ | tee -a $HMDIR/TempStorage/impfilesbk.log
echo $'\n'`date` "| Done!" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo `date` "| Backing up some config files and stuff..." | tee -a $HMDIR/TempStorage/impfilesbk.log
rsync -aAXH --delete --stats $HMDIR/.config $HMDIR/.tmux.conf $HMDIR/.profile $HMDIR/.bashrc $HMDIR/.Xresources $HMDIR/.local/bin/personal $HMDIR/.ssh $BKDIR/config/ | tee -a $HMDIR/TempStorage/impfilesbk.log
echo $'\n'`date` "| Done!" | tee -a $HMDIR/TempStorage/impfilesbk.log
echo $'\n'"--------------------------------------------------" | tee -a $HMDIR/TempStorage/impfilesbk.log