updated edi backup script
This commit is contained in:
parent
e2f4267b7a
commit
0848db107c
@ -11,25 +11,26 @@ shopt -s expand_aliases # make aliases work
|
||||
|
||||
BACKUP_DIR=/sync/backup
|
||||
BACKUP_DIR_HOME=$BACKUP_DIR/home
|
||||
if [[ !($HOME/.bash_aliases_local -ef $BACKUP_DIR_HOME/.bash_aliases_local) ]]; then
|
||||
ln $HOME/.bash_aliases_local $BACKUP_DIR_HOME/.bash_aliases_local
|
||||
fi
|
||||
rsync_backup --link-dest="$HOME/.ssh/" $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/
|
||||
rsync_backup $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/
|
||||
|
||||
BACKUP_DIR_ROOT=$BACKUP_DIR/root/etc
|
||||
sd rsync_backup --link-dest="/etc/ddclient/" /etc/ddclient/ $BACKUP_DIR_ROOT/ddclient/
|
||||
sd rsync_backup --link-dest="/etc/letsencrypt/" /etc/letsencrypt/ $BACKUP_DIR_ROOT/letsencrypt/
|
||||
sd rsync_backup --link-dest="/etc/nginx/" /etc/nginx/ $BACKUP_DIR_ROOT/nginx/
|
||||
sd rsync_backup --link-dest="/etc/ssh/" /etc/ssh/ $BACKUP_DIR_ROOT/ssh/
|
||||
sd rsync_backup --link-dest="/etc/wireguard/" /etc/wireguard/ $BACKUP_DIR_ROOT/wireguard/
|
||||
if [[ !(/etc/ddclient.conf -ef $BACKUP_DIR_ROOT/ddclient.conf) ]]; then
|
||||
ln /etc/ddclient.conf $BACKUP_DIR_ROOT/ddclient.conf
|
||||
fi
|
||||
sd rsync_backup /etc/ddclient/ $BACKUP_DIR_ROOT/ddclient/
|
||||
sd rsync_backup /etc/ddclient.conf $BACKUP_DIR_ROOT/
|
||||
sd rsync_backup /etc/letsencrypt/ $BACKUP_DIR_ROOT/letsencrypt/
|
||||
sd rsync_backup /etc/nginx/ $BACKUP_DIR_ROOT/nginx/
|
||||
sd rsync_backup /etc/ssh/ $BACKUP_DIR_ROOT/ssh/
|
||||
sd rsync_backup /etc/wireguard/ $BACKUP_DIR_ROOT/wireguard/
|
||||
sd rsync_backup /etc/hosts $BACKUP_DIR_ROOT/
|
||||
sd rsync_backup /etc/docker/daemon.json $BACKUP_DIR_ROOT/docker/
|
||||
|
||||
|
||||
#####################
|
||||
### upload backup ###
|
||||
#####################
|
||||
|
||||
if [[ "$1" == "--noupload" ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
sd rsync_backup -e "ssh -i /home/edi/.ssh/id_ed25519" --filter="P /home/docker" /sync/backup/ fabian@garrus:/citadel/backup/edi/
|
||||
sd rsync_backup -e "ssh -i /home/edi/.ssh/id_ed25519" /home/edi/docker/ fabian@garrus:/citadel/backup/edi/home/docker/
|
||||
|
Loading…
Reference in New Issue
Block a user