|
@@ -741,6 +741,9 @@ function expire_gnusocial_posts {
|
741
|
741
|
|
742
|
742
|
expire_days=$((expire_months * 30))
|
743
|
743
|
|
|
744
|
+ # files are what take up most of the backup time, so don't keep them for very long
|
|
745
|
+ expire_days_files=7
|
|
746
|
+
|
744
|
747
|
# To prevent the database size from growing endlessly this script expires posts
|
745
|
748
|
# after a number of months
|
746
|
749
|
if [ ! -d /var/www/${domain_name}/htdocs ]; then
|
|
@@ -790,7 +793,7 @@ function expire_gnusocial_posts {
|
790
|
793
|
|
791
|
794
|
gnusocial_expire_script=/usr/bin/${gnusocial_type}-expire
|
792
|
795
|
echo '#!/bin/bash' > $gnusocial_expire_script
|
793
|
|
- echo "find /var/www/${domain_name}/htdocs/file/* -mtime +${expire_days} -exec rm {} +" >> $gnusocial_expire_script
|
|
796
|
+ echo "find /var/www/${domain_name}/htdocs/file/* -mtime +${expire_days_files} -exec rm {} +" >> $gnusocial_expire_script
|
794
|
797
|
echo "/usr/bin/php $gnusocial_expire_posts_script" >> $gnusocial_expire_script
|
795
|
798
|
chmod +x $gnusocial_expire_script
|
796
|
799
|
|