2021-12-28 02:54:26 -06:00
#!/bin/sh
2021-11-27 19:30:34 -06:00
2021-12-02 13:32:27 -06:00
# This script backs up some important stuff
2021-11-27 19:30:34 -06:00
2022-06-15 01:46:58 -05:00
# Setup location for home and backup directory
2022-07-29 21:50:49 -05:00
HMDIR="/home/sintan"
BKDIR="/mnt/storage/sintan"
2021-12-02 13:32:27 -06:00
2022-07-29 21:50:49 -05:00
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"
2021-11-27 19:30:34 -06:00
2022-07-29 21:50:49 -05:00
echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2021-12-17 22:09:50 -06:00
2022-07-29 21:50:49 -05:00
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"
2022-01-13 12:04:50 -06:00
2022-07-29 21:50:49 -05:00
echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-01-13 12:04:50 -06:00
2022-07-29 21:50:49 -05:00
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"
2022-01-13 12:04:50 -06:00
2022-07-29 21:50:49 -05:00
echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-01-13 12:04:50 -06:00
2022-07-29 21:50:49 -05:00
echo `date` "| Backing up PhotoPrism index..." | tee -a "$HMDIR/TempStorage/impfilesbk.log"
rsync -aAXH --delete --stats "$HMDIR/PhotoPrism/storage/index-backup.sql" "$BKDIR/Programs/photoprism-backup.sql" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
echo $'\n'`date` "| Done!" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-07-20 18:31:02 -05:00
2022-07-29 21:50:49 -05:00
echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-07-20 18:31:02 -05:00
2022-07-29 21:50:49 -05:00
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"
2022-01-13 12:04:50 -06:00
2022-07-29 21:50:49 -05:00
echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-07-20 03:32:32 -05:00
2022-07-29 21:50:49 -05:00
echo `date` "| Backing up some config files and stuff..." | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-07-29 22:16:44 -05:00
rsync -aAXH --delete --stats --exclude={'*cache*','*Cache*'} --delete-excluded "$HMDIR/.config/" "$BKDIR/config/[dot]config/" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-07-29 21:50:49 -05:00
rsync -aAXH --delete --stats "$HMDIR/.profile" "$BKDIR/config/[dot]profile" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
rsync -aAXH --delete --stats "$HMDIR/.bashrc" "$BKDIR/config/[dot]bashrc" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
rsync -aAXH --delete --stats "$HMDIR/.Xresources" "$BKDIR/config/[dot]Xresources" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
rsync -aAXH --delete --stats "$HMDIR/.local/bin/personal/" "$BKDIR/config/[dot]local_bin_personal/" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
rsync -aAXH --delete --stats "$HMDIR/.ssh/" "$BKDIR/config/[dot]ssh/" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
echo $'\n'`date` "| Done!" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
2022-06-15 01:31:38 -05:00
2022-07-29 21:50:49 -05:00
echo $'\n'"--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | tee -a "$HMDIR/TempStorage/impfilesbk.log"
echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log"