From 5676ba9a0e04d3c716a8d4f2d3619d9c66f98f31 Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 30 May 2018 00:03:13 -0500 Subject: [PATCH] add dbg pring to scripts --- scripts/create-backup.sh | 1 + scripts/import-disqus.sh | 1 + scripts/migrate-data.sh | 2 ++ scripts/restore-backup.sh | 4 +++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/create-backup.sh b/scripts/create-backup.sh index 751007d8..38880440 100755 --- a/scripts/create-backup.sh +++ b/scripts/create-backup.sh @@ -6,3 +6,4 @@ 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}" \ No newline at end of file diff --git a/scripts/import-disqus.sh b/scripts/import-disqus.sh index e400f71e..7b35e49a 100644 --- a/scripts/import-disqus.sh +++ b/scripts/import-disqus.sh @@ -2,3 +2,4 @@ set -e echo "import disqus file $1 to site $2" curl -X POST -H "Content-Type: application/json" -d @/srv/var/$1 "http://127.0.0.1:8081/api/v1/admin/import?site=${2}&provider=disqus&secret=${SECRET}" +echo "import completed" \ No newline at end of file diff --git a/scripts/migrate-data.sh b/scripts/migrate-data.sh index 6b6c2347..7397a0a4 100755 --- a/scripts/migrate-data.sh +++ b/scripts/migrate-data.sh @@ -21,3 +21,5 @@ curl -X POST -H "Content-Type: application/json" --data-binary @/tmp/backup.rema rm /tmp/backup.remark rm /tmp/export-remark.gz + +echo "migration completed" \ No newline at end of file diff --git a/scripts/restore-backup.sh b/scripts/restore-backup.sh index ebc0457b..06775c7f 100644 --- a/scripts/restore-backup.sh +++ b/scripts/restore-backup.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -echo "import backup file $1 to site $2" +echo "restore backup file $1 to site $2" BACKUP_PATH=${BACKUP_PATH:-./var} echo "unpack $1" gunzip -c ${BACKUP_PATH}/$1 >/tmp/backup.remark @@ -10,3 +10,5 @@ echo "source file size ${size}" curl -X POST -H "Content-Type: application/json" --data-binary @/tmp/backup.remark "http://127.0.0.1:8081/api/v1/admin/import?site=${2}&provider=native&secret=${SECRET}" rm /tmp/backup.remark + +echo "backup restored" \ No newline at end of file