Move remote blog backup to app script
This commit is contained in:
parent
1467b02487
commit
84db3b4037
|
@ -39,7 +39,7 @@ MY_BLOG_TITLE="My Blog"
|
||||||
MY_BLOG_SUBTITLE="Another ${PROJECT_NAME} Blog"
|
MY_BLOG_SUBTITLE="Another ${PROJECT_NAME} Blog"
|
||||||
|
|
||||||
function reconfigure_blog {
|
function reconfigure_blog {
|
||||||
echo -n ''
|
echo -n ''
|
||||||
}
|
}
|
||||||
|
|
||||||
function upgrade_blog {
|
function upgrade_blog {
|
||||||
|
@ -121,7 +121,18 @@ function restore_local_blog {
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_remote_blog {
|
function backup_remote_blog {
|
||||||
echo -n ''
|
if grep -q "Blog domain" $COMPLETION_FILE; then
|
||||||
|
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}')
|
||||||
|
temp_backup_dir=/var/www/${FULLBLOG_DOMAIN_NAME}/htdocs
|
||||||
|
if [ -d $temp_backup_dir ]; then
|
||||||
|
echo $"Backing up blog"
|
||||||
|
backup_directory_to_friend $temp_backup_dir blog
|
||||||
|
echo $"Backup of blog complete"
|
||||||
|
else
|
||||||
|
echo $"Blog domain specified but not found in $temp_backup_dir"
|
||||||
|
exit 2578
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_remote_blog {
|
function restore_remote_blog {
|
||||||
|
|
|
@ -244,19 +244,6 @@ function backup_tor {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_blog {
|
|
||||||
if grep -q "Blog domain" $COMPLETION_FILE; then
|
|
||||||
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}')
|
|
||||||
if [ -d /var/www/${FULLBLOG_DOMAIN_NAME} ]; then
|
|
||||||
echo $"Backing up blog"
|
|
||||||
backup_directory_to_friend /var/www/${FULLBLOG_DOMAIN_NAME}/htdocs blog
|
|
||||||
else
|
|
||||||
echo $"Blog domain specified but not found in /var/www/${FULLBLOG_DOMAIN_NAME}"
|
|
||||||
exit 2578
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function backup_certs {
|
function backup_certs {
|
||||||
if [ -d /etc/ssl ]; then
|
if [ -d /etc/ssl ]; then
|
||||||
echo $"Backing up certificates"
|
echo $"Backing up certificates"
|
||||||
|
@ -480,10 +467,9 @@ if [[ $TEST_MODE == "no" ]]; then
|
||||||
backup_web_server
|
backup_web_server
|
||||||
backup_admin_readme
|
backup_admin_readme
|
||||||
backup_mariadb
|
backup_mariadb
|
||||||
|
|
||||||
backup_blog
|
|
||||||
backup_certs
|
backup_certs
|
||||||
backup_mailing_list
|
backup_mailing_list
|
||||||
|
|
||||||
backup_xmpp
|
backup_xmpp
|
||||||
backup_ipfs
|
backup_ipfs
|
||||||
backup_dlna
|
backup_dlna
|
||||||
|
|
Loading…
Reference in New Issue