Remote backup of configuration files
This commit is contained in:
parent
68442896af
commit
4cae6b24ce
|
@ -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}')
|
||||
|
|
Loading…
Reference in New Issue