From 95811c903bf128c5605913fcfaf9414f8119f754 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sat, 17 Sep 2022 22:09:28 -0500 Subject: [PATCH] Add code to sync with server --- impfilesbk | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/impfilesbk b/impfilesbk index ae33b81..cae0ce8 100644 --- a/impfilesbk +++ b/impfilesbk @@ -27,11 +27,11 @@ echo $'\n'`date` "| Done!" | tee -a "$HMDIR/TempStorage/impfilesbk.log" echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log" -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" +# 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" -echo "--------------------------------------------------" | 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" @@ -49,5 +49,27 @@ rsync -aAXH --delete --stats "$HMDIR/.ssh/" "$BKDIR/dotfiles/[dot]ssh/" | tee -a echo $'\n'`date` "| Done!" | tee -a "$HMDIR/TempStorage/impfilesbk.log" echo $'\n'"--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log" -echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | tee -a "$HMDIR/TempStorage/impfilesbk.log" +echo "NOW SYNCING UP WITH THE SERVER" | tee -a "$HMDIR/TempStorage/impfilesbk.log" echo "--------------------------------------------------" | tee -a "$HMDIR/TempStorage/impfilesbk.log" + +HMDIR="/mnt/storage/sintan" +BKDIR="server-ssh:/mnt/storage" +LGDIR="/home/sintan" + +rsync -aAXH --delete --stats "$BKDIR/Documents/Backup/pkglists_server/" "$HMDIR/Documents/Backup/pkglists_server/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats -f '- *.git/' "$HMDIR/Documents/" "$BKDIR/Documents/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$HMDIR/Academics/" "$BKDIR/Academics/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats --no-links "$HMDIR/Pictures/" "$BKDIR/Pictures/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$HMDIR/Zotero/" "$BKDIR/Zotero/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$HMDIR/dotfiles/" "$BKDIR/dotfiles/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$BKDIR/dotfiles_server/" "$HMDIR/dotfiles_server/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$BKDIR/Programs/Docker/" "$HMDIR/Programs/Docker/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$BKDIR/Programs/installer-scripts/" "$HMDIR/Programs/installer-scripts/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$HMDIR/Programs/" "$BKDIR/Programs/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$BKDIR/Movies/" "$HMDIR/Movies/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$HMDIR/Music/" "$BKDIR/Music/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +rsync -aAXH --delete --stats "$HMDIR/Videos/" "$BKDIR/Videos/" | tee -a "$LGDIR/TempStorage/impfilesbk.log" + +echo $'\n'"--------------------------------------------------" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | tee -a "$LGDIR/TempStorage/impfilesbk.log" +echo "--------------------------------------------------" | tee -a "$LGDIR/TempStorage/impfilesbk.log"