move scripts to backend

This commit is contained in:
Umputun
2018-06-30 13:12:04 -05:00
parent 1250828509
commit e254936521
5 changed files with 4 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# this scrips makes a backup file to /srv/var/userbackup-<site>-<timestamp>.gz
set -e
BACKUP_PATH=${BACKUP_PATH:-./var}
backup_file=${BACKUP_PATH}/userbackup-${1}-$(date +%s).gz
echo "make backup file for site $1 to $backup_file"
curl "http://127.0.0.1:8081/api/v1/admin/export?site=${1}&secret=${SECRET}" > ${backup_file}
echo "created backup ${backup_file}"