1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.8 KiB

#!/bin/bash
# Simple rsync backup script for my MacBookPro
#
# Dominic Reich, OE7DRT, dominic@mm.st
# we don't need this, because we run sudo below…
# if [ "$EUID" -ne 0 ]
# then echo "Not root. Exiting."
# exit
# fi
# rsync -qaR \
# --append-verify
# good, but not effective (another way to do this)
# sudo rsync -avzhRP --del --stats --inplace \
# --include='/etc/***' \
# --include='/boot/***' \
# --include='/home/***' \
# --include='/usr/local/***' \
# --include='/opt/***' \
# --include='/lib/systemd/system' \
# --exclude='*' \
# / nas:/volume1/NetBackup/polaris-kde-2022/
## The old code — since I use sudo below, I do this
## with a more privileged user in one run because I
## also want to backup some system files
#rsync -avzh --delete-delay --stats --partial \
# --append-verify --inplace --progress \
# --exclude '.cache' \
# --exclude '.gvfs' \
# --exclude '.DS_Store' \
# --exclude 'Thumbs.db' \
# --exclude 'lost+found' \
# --exclude '.Trash' \
# --exclude '.bash_history' \
# --exclude '.zhistory' \
# --exclude '.local/share/Steam/steamapps/common/' \
# --exclude 'Musik/nas/' \
# --exclude 'NetBackup/' \
# --exclude 'SynologyDrive/' \
# '/home/dominic/./' nas:/volume1/NetBackup/polaris-kde-2022/sync/
#sudo rsync -avzhRP --del --stats --inplace \
sudo rsync -avzhRP --del --stats \
--exclude 'BACKUP_LINUX_DISK/***' \
--exclude 'BACKUP_OLDMAC/***' \
--exclude '.SynologyDrive/***' \
--exclude 'SynologyDrive/***' \
--exclude '.cache/***' \
--exclude '.gvfs/***' \
--exclude '.DS_Store' \
--exclude 'Thumbs.db' \
--exclude 'lost+found/***' \
--exclude '.Trash/***' \
--exclude 'Steam/***' \
--exclude '_nas-*/***' \
--exclude 'Attack/***' \
'/./etc' \
'/./boot' \
'/./home' \
'/./usr/local' \
'/./opt' \
'/./root' \
'/./lib/systemd/system' \
'/./var/lib/libvirt' \
nas:/volume1/NetBackup/polaris-arch/./