Backup changes

master
Nathan Steel 3 weeks ago
parent 30cc87455c
commit 2224b03431

@ -2,14 +2,14 @@
# 0 * * * * /home/nathan/Documents/backup.sh
# Check if the USB is plugged in (Gnome auto-mounts to /run/media)
USB="/run/media/$USER/sd_backup";
USB="/run/media/$USER/SD_BACKUP";
if [[ ! -d $USB ]]; then
exit 1 # sd_backup is not plugged in;
fi
USB_DIR="/fedora/borg";
USB_DIR="/fedora";
DIRS="git nas 360ss";
DIRS="git nas";
BASE_DIR="/home/nathan/Documents/";
# Basically the code from directory_backup in scripts.git
@ -45,10 +45,13 @@ rsync_backup (){
--delete-before
}
# Also do an over the internet backup some times
# weekdays at 12:30? so it can happen during break?
for bDir in $DIRS
do
BACKUP_DIR=$USB$USB_DIR/$bDir;
CLONE_DIR=$USB/fedora/rsync/$bDir;
BACKUP_DIR=$USB$USB_DIR/borg/$bDir;
CLONE_DIR=$USB$USB_DIR/rsync/$bDir;
DIR=$BASE_DIR$bDir;
borg_backup

Loading…
Cancel
Save