Stopping and restarting pleroma during backups

This commit is contained in:
Bob Mottram 2018-02-17 15:07:52 +00:00
parent b8327a4461
commit 05c53ce59c
1 changed files with 12 additions and 0 deletions

View File

@ -744,6 +744,8 @@ function backup_local_pleroma {
PLEROMA_DOMAIN_NAME=$(get_completion_param "pleroma domain")
fi
systemctl stop pleroma
function_check suspend_site
suspend_site ${PLEROMA_DOMAIN_NAME}
@ -757,6 +759,8 @@ function backup_local_pleroma {
function_check restart_site
restart_site
systemctl restart pleroma
}
function restore_local_pleroma {
@ -769,6 +773,8 @@ function restore_local_pleroma {
temp_restore_dir=/root/temppleroma
pleroma_dir=$PLEROMA_DIR
systemctl stop pleroma
PLEROMA_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_pleroma/hostname)
function_check pleroma_create_database
pleroma_create_database
@ -797,6 +803,8 @@ function backup_remote_pleroma {
PLEROMA_DOMAIN_NAME=$(get_completion_param "pleroma domain")
fi
systemctl stop pleroma
function_check suspend_site
suspend_site ${PLEROMA_DOMAIN_NAME}
@ -810,6 +818,8 @@ function backup_remote_pleroma {
function_check restart_site
restart_site
systemctl restart pleroma
}
function restore_remote_pleroma {
@ -822,6 +832,8 @@ function restore_remote_pleroma {
temp_restore_dir=/root/temppleroma
pleroma_dir=$PLEROMA_DIR
systemctl stop pleroma
PLEROMA_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_pleroma/hostname)
function_check pleroma_create_database
pleroma_create_database