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

Exclude .git folders from backup

This commit is contained in:
Sayantan Santra 2022-09-17 22:24:54 -05:00
parent 7de9290e88
commit 5a94ad465d

View file

@ -10,7 +10,7 @@ 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"
rsync -aAXH --delete --stats -f '- *.git/' -f '- *Rust/*/target/' "$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"
@ -57,7 +57,7 @@ BKDIR="server-rsync:/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/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"