From 4cae6b24ce552d470a7374a7962dc7551c4315a4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 9 Dec 2015 12:26:12 +0000 Subject: [PATCH] Remote backup of configuration files --- src/freedombone-backup-remote | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index b770a3d7..9b008176 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -30,6 +30,7 @@ PROJECT_NAME='freedombone' COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt +CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg export TEXTDOMAIN=${PROJECT_NAME}-backup-remote export TEXTDOMAINDIR="/usr/share/locale" @@ -118,6 +119,15 @@ function backup_database_to_friend { fi } +# configuration files +echo $"Backing up ${PROJECT_NAME} configuration files" +if [ ! -d /root/tempbackupconfig ]; then + mkdir -p /root/tempbackupconfig +fi +cp -f $CONFIG_FILE /root/tempbackupconfig +cp -f $COMPLETION_FILE /root/tempbackupconfig +backup_directory_to_friend /root/tempbackupconfig config + # Backup user files for d in /home/*/ ; do USERNAME=$(echo "$d" | awk -F '/' '{print $3}')