Commit 025ec77c authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team

scripts/backup-remote.sh: variables, comments

parent 05024b02
#!/bin/bash
# This script is to be launched from an external backup server
# Local backup directory
DIR_BACKUP=/mnt/data/backup/vidjil/
# Remote server
VIDJIL_SERVER=vidjil-bak@rbx.vidjil.org
options=$1
filename=$(ssh vidjil-bak@rbx.vidjil.org "cd /home/vidjil/server; sh ./backup.sh ${options} ~" | tail -1)
scp vidjil-bak@rbx.vidjil.org:${filename}.zip /mnt/data/backup/vidjil/
ssh vidjil-bak@rbx.vidjil.org "rm -f ${filename}.zip"
filename=$(ssh ${VIDJIL_SERVER} "cd /home/vidjil/server; sh ./backup.sh ${options} ~" | tail -1)
scp ${VIDJIL_SERVER}:${filename}.zip ${DIR_BACKUP}
ssh ${VIDJIL_SERVER} "rm -f ${filename}.zip"
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