[SolidMean] ForumBackup

[SolidMean] ForumBackup 1.3.01

No permission to download
You can set your own message for running backups, but it should use the same styling as the default message when the forum is offline. I'll try some testing to verify that, but you should be able to use any HTML in the "Maintenance Message" option on the Miscellaneous tab of the addon. You can also just remove the "Currently running backups, hang on tight." text from that option, and it'll default to the "Board is inactive" text XenForo normally displays when the forum is unavailable.
 
@SneakyDave tried to run my monthly backup again and ended up with that timeout error. i think its because my forum file directory is too large. you see it ended up with only 500mb zip

1.webp

cPanel File Manager v3 2016-08-20 13-52-27.webp

no server errors were logged.
 
There is an option for the add-on to turn on debug output, which outputs progress to a debug file found in the same directory as your backup files
 
There is an option for the add-on to turn on debug output, which outputs progress to a debug file found in the same directory as your backup files
Here's a copy of the debug file:

tar: /home/dressedw/public_html/data/countryflags/reader.log: file changed as we read it
tar: /home/dressedw/public_html/data/countryflags/reader.log: file changed as we read it
2016-08-22 15:53:23 | INFO | START Code Backup
2016-08-22 15:53:23 | INFO | Creating the tar file: tar --ignore-failed-read -f /home/dressedw/backups/forumbackup_2016-08-22-155323.code.tar -cP /home/dressedw/public_html 2>> /home/dressedw/backups/forumbackup.log

today it created a 443mb file as opposed to the 2 or 3gb file it should be creating.
 
Sorry, must have missed that original post.

If you see a START line for the "Code Backup", and not an END line, then that usually means the process was killed, in this case, 'tar', or it just went away for some reason. Assuming you're on shared hosting, I'd ask your host if there is a CPU usage problem or a PHP long running script issue that is preventing your tar command from finishing. Most times, it is difficult to track down these types of things.

Normally, running the code backup should contains line that look this this:
Code:
2016-08-23 05:38:39 | INFO | START Code Backup
2016-08-23 05:38:39 | INFO | Creating the tar file: tar --ignore-failed-read -f /xxxxx/bash.zone/thetaz/backups/bashzone_backup_xxxxxx-053839.code.tar -cP /xxxxx/bash.zone/public 2>> /xxxxx/bash.zone/thetaz/backups/bashzone_backup.log
2016-08-23 05:38:44 | INFO | Compressing the file: pigz /xxxxx/bash.zone/thetaz/backups/bashzone_backup_xxxxxx-053839.code.tar 2>> /xxxxx/bash.zone/thetaz/backups/bashzone_backup.log
2016-08-23 05:38:47 | INFO | Code backup complete...
2016-08-23 05:38:47 | INFO | Deleting old code backups, keeping 5
2016-08-23 05:38:47 | INFO | Found backup file: bashzone_backup_xxxxxx-053123.code.tar.gz, modified 2016-08-22 02:31:28
2016-08-23 05:38:47 | INFO | Found backup file: bashzone_backup_xxxxxx-055638.code.tar.gz, modified 2016-08-21 02:56:43
2016-08-23 05:38:47 | INFO | Found backup file: bashzone_backup_xxxxxx-054411.code.tar.gz, modified 2016-08-20 02:44:16
2016-08-23 05:38:47 | INFO | Found backup file: bashzone_backup_xxxxxx-053839.code.tar.gz, modified 2016-08-23 02:38:44
2016-08-23 05:38:47 | INFO | Found backup file: bashzone_backup_xxxxxx-053158.code.tar.gz, modified 2016-08-19 02:32:03
2016-08-23 05:38:47 | INFO | Found backup file: bashzone_backup_xxxxxx-054043.code.tar.gz, modified 2016-08-18 02:40:48
2016-08-23 05:38:47 | INFO | Sorted 6 filenames by filemtime
2016-08-23 05:38:47 | INFO | Deleted code backup: /xxxxx/bash.zone/thetaz/backups/bashzone_backup_xxxxx-054043.code.tar.gz
2016-08-23 05:38:47 | INFO | Verified that code backup exists...
2016-08-23 05:38:47 | INFO | Verified that code backup has data...
2016-08-23 05:40:26 | INFO | END Code backup
 
Hi, I used this add-on for my small forum and it works great, but on my larger forum which is on the same dedicated server as the small one it looks like it never really gets started.
I tried to run the cron manually but after about a minute I got an internal server error... the debug file shows only 3 lines, START Database Backup, Created temp config: and then the Running database backup with: mysqldump paths.
Is there something I need to adjust?
 
There is a set_time_limit in PHP and a fastcgi_read_timeout limit to set in nginx if you're using that. I've had to increase both for my forums
 
Do I make this change in php.ini? I currently do not have a set_time_limit line in that file, so would it then default to "max_execution_time"?

My current settings on a dedicated Linux box with 4G of ram.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 500
max_input_time = 50
memory_limit = 128M
 
Last edited:
I'm away from my main PC, but I think set_time_limit corresponds to the max execution time.

Your web server or host may have its own limitations set.
 
Has been running great for months. Last night the forum stuck in the closed state. Any idea what could have happened? I did not have the debug file on (I do now).
 
The backup process, during tar or gzip must have quit unexpectedly, or maybe a server reboot?

If it happens again, send me the last 50 lines of your debug file and I'll look at it
 
I run into this on a shared server. I have my cron jobs 30 minutes apart and what happens is that one times out and throws a server error, but you don't see that when it runs on a cron. For me, it's the Code cron that does it because that is larger and I think the zip process takes up too much resources and the host kicks it out....But the bottom line is it is usually host related and resource related.
Thanxx for taking the time to dive into the details of this. It happened to me today, so your post was quite insightful.
My solution to this was to recommend breaking up the cron by excluding a directory, which is why that is now an option.
Excellent suggestion. :cool:
Also make sure your crons are spaced apart
And yet another piece of sage advice. (y)
 
Hi Dave

I wanted to know if there was a way to place a forum backup in a sub folder, then open it up and retrieve a deleted thread?

Thanks
Sam
 
I have been using this addon as a simple backup scheduled solution. It works wonders and does the job well.

I noticed something while helping a client out with a feature failure on a forum of mine, and I want to offer an idea for either the developer of this addon or anyone that can figure it out a similar solution for me to implement.

The scheduled backup I love, I set it for the wee hours of the morning so as to not be too disruptive.

But I have had several complaints of posters creating their post while the backup starts, and then clicking submit during the backup, thereby loosing everything. It is problematic for any visitor who isn't aware of the scheduled time, nor maybe not noticing the time. The backup has also disrupted a couple of purchases on my site. This is how I finally figured out a simple(?) solution to this.

  • Problem: Backup routine may inadvertently interrupt an ongoing process by a member, even potentially corrupting that users process. (posts, purchases, updates, etc)
  • Solution: Build into this addon, a method of forcing a warning popup on any open page in a browser, by a logged in member, giving a 5 minute warning and countdown of an impending backup that would temporarily take the site offline. Or some type of indicator with a notice.
 
Last edited:
Top Bottom