Remote backup of configuration files

This commit is contained in:
Bob Mottram 2015-12-09 12:26:12 +00:00
parent 68442896af
commit 4cae6b24ce
1 changed files with 10 additions and 0 deletions

View File

@ -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}')