Don't backup more data than necessary

This commit is contained in:
Bob Mottram 2017-07-09 17:06:07 +01:00
parent 73cfa41352
commit 3b5170c70a
2 changed files with 12 additions and 0 deletions

View File

@ -375,6 +375,9 @@ function backup_local_gnusocial {
GNUSOCIAL_DOMAIN_NAME=$(get_completion_param "gnusocial domain") GNUSOCIAL_DOMAIN_NAME=$(get_completion_param "gnusocial domain")
fi fi
# don't backup more data than we need to
gnusocial-expire-posts
source_directory=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/backup source_directory=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then if [ ! -d $source_directory ]; then
mkdir $source_directory mkdir $source_directory
@ -452,6 +455,9 @@ function backup_remote_gnusocial {
GNUSOCIAL_DOMAIN_NAME=$(get_completion_param "gnusocial domain") GNUSOCIAL_DOMAIN_NAME=$(get_completion_param "gnusocial domain")
fi fi
# don't backup more data than we need to
gnusocial-expire-posts
source_directory=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/backup source_directory=/var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then if [ ! -d $source_directory ]; then
mkdir $source_directory mkdir $source_directory

View File

@ -391,6 +391,9 @@ function backup_local_postactiv {
POSTACTIV_DOMAIN_NAME=$(get_completion_param "postactiv domain") POSTACTIV_DOMAIN_NAME=$(get_completion_param "postactiv domain")
fi fi
# don't backup more data than we need to
postactiv-expire-posts
source_directory=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/backup source_directory=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then if [ ! -d $source_directory ]; then
mkdir $source_directory mkdir $source_directory
@ -468,6 +471,9 @@ function backup_remote_postactiv {
POSTACTIV_DOMAIN_NAME=$(get_completion_param "postactiv domain") POSTACTIV_DOMAIN_NAME=$(get_completion_param "postactiv domain")
fi fi
# don't backup more data than we need to
postactiv-expire-posts
source_directory=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/backup source_directory=/var/www/${POSTACTIV_DOMAIN_NAME}/htdocs/backup
if [ ! -d $source_directory ]; then if [ ! -d $source_directory ]; then
mkdir $source_directory mkdir $source_directory