Commit 437e62bb authored by Mikaël Salson's avatar Mikaël Salson

backup-remote.sh: Updates on the script

The script has been modified a while ago for two reasons:
- We should use a virtualenv to run the server
- We do not force the extension of the backup to be .zip (an incremental backup is not a zip)
parent 91e76c12
......@@ -6,10 +6,10 @@
DIR_BACKUP=/mnt/data/backup/vidjil/
# Remote server
VIDJIL_SERVER=vidjil-bak@db.vidjil.org
ARCHIVE_DIR=/mnt/data/tmp
options=$1
filename=$(ssh ${VIDJIL_SERVER} "cd /home/vidjil/server; sh ./backup.sh ${options} ~" | tail -1)
filename=$(ssh ${VIDJIL_SERVER} "cd /home/vidjil/server; . /home/vidjil/virtualenv/bin/activate; sh ./backup.sh ${options} ${ARCHIVE_DIR}" | tail -1)
scp ${VIDJIL_SERVER}:${filename} ${DIR_BACKUP}
scp ${VIDJIL_SERVER}:${filename}.zip ${DIR_BACKUP}
ssh ${VIDJIL_SERVER} "rm -f ${filename}.zip"
ssh ${VIDJIL_SERVER} "rm -f ${filename}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment