[SolidMean] ForumBackup

[SolidMean] ForumBackup 1.3.01

No permission to download
Great add-on - can I adjust the CRON entry to run every other day? Would that affect the backup counts (by not having daily dated backups) or does it just count the physical number of backup files that exist in the directory and rotate them accordingly?
 
If you run it every other day, and set the option to keep 5 copies, it just keeps 5 copies, it doesn't matter how often you run the backup.
 
SneakyDave updated [SolidMean] ForumBackup with a new update entry:

04/11/2015 - Small Bug Fixes

- Fixed issue with database passwords with special characters generating empty backups. Thanks to @TDUBS and @xenboostmike for help with this.
- Added asserts for the exec() php function prior to doing any backups. This is done at installation time, but on a host/server change, this check wasn't being done.

Read the rest of this update entry...

Help from @TDUBS and @xenBoost Mike for identifying the password problem.
 
Not sure if this has to do with this plugin or anything, but I've noticed my code backups have become significantly larger than before.

Screenshot_19-32-38.png
 
Do they still have a gzip (.gz) extension?

If so, did you add any new addons like the Media Gallery that could make it larger?

If you are backing up your files to a directory within your xfroot, that could also explain it.
 
They still have a zip extension. I don't use any big addons like Media Gallery or anything. I do host my forums using a Centmin Mod web server setup with caching, but I'm not sure if that could be a factor. Also, they're being backed up in a sub directory, not the root directory itself. I generally download the backups from my FTP to my PC just to keep them safe, but I can't now because the file size is big and it takes forever to download.
 
If its a sub directory of your xfroot, that's the problem. Your backups are also getting included in your file system backup.

You will want to change your option to back up your files outside or above your forum root.
 
If its a sub directory of your xfroot, that's the problem. Your backups are also getting included in your file system backup.

You will want to change your option to back up your files outside or above your forum root.

Yep, that was the issue. It clogged up my disk space and caused my forum to go offline due to no disk space left. Where's this option to change for backing up files outside or above my forum root?
 
Last edited:
Yep, that was the issue. It clogged up my disk space and caused my forum to go offline due to no disk space left. Where's this option to change for backing up files outside or above my forum root?

It's the very first option: Backup Directory

Just create a backup directory that is above your public forum root and then add the new directory path to the Backup Directory option.

For example, if you're currently using something like this for your forum root:
/home/sitename/public_html

Creating a backup folder in this location would put it above your forum root:
/home/sitename/forumbackup

Then in the Backup Directory option enter: /home/sitename/forumbackup

Cheers,
Shaun
 
For example, if you're currently using something like this for your forum root:
/home/sitename/public_html

Creating a backup folder in this location would put it above your forum root:
/home/sitename/forumbackup

So I wouldn't be doing:
/home/sitename/public_html/forumbackup?

Just:
/home/sitename/forumbackup?

To help you understand better, I have the below as my root directory:
/home/nginx/domains/sitename/public

My forum backup folder is:
/home/nginx/domains/sitename/public/backupfolder

The path I have in the plugin options is:
/home/nginx/domains/sitename/public/backupfolder/
 
To help you understand better, I have the below as my root directory:
/home/nginx/domains/sitename/public

My forum backup folder is:
/home/nginx/domains/sitename/public/backupfolder

... and this is how you've come to use up all your free drive space.

For illustration purposes we'll say that your XF backup file comes in at 500MB.

So backup1 will grab all the files within your forum root directory:
/home/nginx/domains/sitename/public

And it will save the resulting 500MB backup1 file here:
/home/nginx/domains/sitename/public/backupfolder

So this first backup creates a footprint on your server of around 1GB - 500MB of XF files + the 500MB backup1 file.

Now because you've placed your backup files within your XF site directory structure, the next backup will grab your 500MB XF files and your previous backup1 file from /home/nginx/domains/sitename/public/backupfolder - making backup2 500MB XF files + 500MB backup1 file - so a slightly larger 1GB.

backup3 will include the two previous backups (1 and 2) in its backup file of around 2GB (500MB XF + 500MB backup1 + 1GB backup2)

backup4 does the same with all the previous backups too, so comes in at a hefty 4GB (500MB XF + 500MB backup1 + 1GB backup2 + 2GB backup3)

backup5 starts to really rack-up the HDD usage at 8GB (500MB + backup1 + backup2 + backup3 + backup4)

backup6 weighs-in at a clumpy 16GB (500MB + backup1 + backup2 + backup3 + backup4 + backup5)

backup7 - 32GB
backup8 - 64GB
backup9 - 128GB
backup10 - 256GB ... and, well, you get the idea. Within a short timeframe your free space disappears.

This is why you need the backup folder to be above the XF root structure - so that it doesn't keep backing up the previous backups as well. (y)
 
I think you're running centminmod.

You can create a 'backups' directory in /home/nginx/domains/sitename/private/

And chmod that directory ad 777, and then specify this as your backup directory:

/home/nginx/domains/sitename/private/backups

Edit: never mind, looks like you got it sorted.
 
Would it be possible to have an option which allows us to configure whether or not to automatically delete the backup(s) off the server after a certain amount of time? I personally download the backups from my server to my desktop and then to my external hard drives, then I delete the backup(s) off the server for security purposes. However, it gets a bit tiring manually deleting backups every night, so maybe have an option to run scheduled deletion? Just an idea.
 
Would it be possible to have an option which allows us to configure whether or not to automatically delete the backup(s) off the server after a certain amount of time? I personally download the backups from my server to my desktop and then to my external hard drives, then I delete the backup(s) off the server for security purposes. However, it gets a bit tiring manually deleting backups every night, so maybe have an option to run scheduled deletion? Just an idea.

Under the "Code" and "Database" tabs, you have a selection of how many backups to keep before deletion. You could set it to 7, and then it would keep 7 instances of your backups.
 
@SneakyDave thank you so much for this addon, it works great!

One oddity though, in the cron job I have the time set to midnight but the "next run" time shows 7pm. It ran at 7pm also. So I changed it to 4am and then it said next run at 11pm. It seems that it thinks the next run is 5 hours before the set time. any idea? Not a big deal, just kinda odd.

Also, is there any problem with having both crons run at the exact same time?
 
One oddity though, in the cron job I have the time set to midnight but the "next run" time shows 7pm. It ran at 7pm also. So I changed it to 4am and then it said next run at 11pm. It seems that it thinks the next run is 5 hours before the set time. any idea? Not a big deal, just kinda odd.

Did you change the cron tasks start times or frequency? By default, the database is backed up at midnight daily, and the file system is backed up 30 minutes later, but that time may not be based on 'your' time, depending on the time zones.

Can you PM me your cron task settings and I'll take a look?

Also, is there any problem with having both crons run at the exact same time?

I wouldn't recommend it. The 'Make the board available' switch processing can get confused because it will not make the board available after a backup if the board was unavailable when it started, so depending on when those 2 backups run, you may find that your forum doesn't get enabled after backup.

Depending on how long it takes to backup your database, I would schedule the file system backup about 5 or 10 minutes after that.
 
Back
Top Bottom