Compare commits
No commits in common. "e37268fd8821b399b830ad12b6d81e0a45041f40" and "f23a40f524441f21d9c7e1987a05118147525173" have entirely different histories.
e37268fd88
...
f23a40f524
@ -5,6 +5,28 @@ source /sync/home_external/.bash_aliases
|
||||
shopt -s expand_aliases # make aliases work
|
||||
|
||||
|
||||
###############################
|
||||
### update local backup dir ###
|
||||
###############################
|
||||
|
||||
BACKUP_DIR=/sync/backup
|
||||
ensureDirectory $BACKUP_DIR
|
||||
BACKUP_DIR_HOME=$BACKUP_DIR/home
|
||||
ensureDirectory $BACKUP_DIR_HOME
|
||||
backupDirectory $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/
|
||||
|
||||
BACKUP_DIR_ROOT=$BACKUP_DIR/root/etc
|
||||
ensureRootDirectory $BACKUP_DIR_ROOT
|
||||
sd rsync_backup /etc/hosts $BACKUP_DIR_ROOT/
|
||||
sd rsync_backup /etc/ddclient.conf $BACKUP_DIR_ROOT/
|
||||
backupRootDirectory /etc/ddclient/ $BACKUP_DIR_ROOT/ddclient/
|
||||
backupRootDirectory /etc/letsencrypt/ $BACKUP_DIR_ROOT/letsencrypt/
|
||||
backupRootDirectory /etc/nginx/ $BACKUP_DIR_ROOT/nginx/
|
||||
backupRootDirectory /etc/ssh/ $BACKUP_DIR_ROOT/ssh/
|
||||
backupRootDirectory /etc/wireguard/ $BACKUP_DIR_ROOT/wireguard/
|
||||
backupRootDirectory /etc/docker/daemon.json $BACKUP_DIR_ROOT/docker/
|
||||
|
||||
|
||||
backupRootDirectory() {
|
||||
ensureRootDirectory $2
|
||||
sd rsync_backup $1 $2
|
||||
@ -29,27 +51,6 @@ ensureDirectory() {
|
||||
fi
|
||||
}
|
||||
|
||||
###############################
|
||||
### update local backup dir ###
|
||||
###############################
|
||||
|
||||
BACKUP_DIR=/sync/backup
|
||||
ensureDirectory $BACKUP_DIR
|
||||
BACKUP_DIR_HOME=$BACKUP_DIR/home
|
||||
ensureDirectory $BACKUP_DIR_HOME
|
||||
backupDirectory $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/
|
||||
|
||||
BACKUP_DIR_ROOT=$BACKUP_DIR/root/etc
|
||||
ensureRootDirectory $BACKUP_DIR_ROOT
|
||||
sd rsync_backup /etc/hosts $BACKUP_DIR_ROOT/
|
||||
sd rsync_backup /etc/ddclient.conf $BACKUP_DIR_ROOT/
|
||||
backupRootDirectory /etc/ddclient/ $BACKUP_DIR_ROOT/ddclient/
|
||||
backupRootDirectory /etc/letsencrypt/ $BACKUP_DIR_ROOT/letsencrypt/
|
||||
backupRootDirectory /etc/nginx/ $BACKUP_DIR_ROOT/nginx/
|
||||
backupRootDirectory /etc/ssh/ $BACKUP_DIR_ROOT/ssh/
|
||||
backupRootDirectory /etc/wireguard/ $BACKUP_DIR_ROOT/wireguard/
|
||||
backupRootDirectory /etc/docker/daemon.json $BACKUP_DIR_ROOT/docker/
|
||||
|
||||
#####################
|
||||
### upload backup ###
|
||||
#####################
|
||||
|
Loading…
Reference in New Issue
Block a user