[SolidMean] ForumBackup

[SolidMean] ForumBackup 1.3.01

No permission to download
How long my site will be in maintenance mode? Will my site open again automatically after backup process?
Just for as long as it takes to do the backup. Your results will vary, but one of my forums has about 200k messages, and 3000 members, and the forum was in maintenance for just less than a minute.

Yes, it opens again automatically, and restores your original 'Board Inactive' message
 
Board not being turned back after the backup, started at 03:15 - 07:00 a.m.. I try v 1.0.1 now.

I've got this too... Using v1.0.1

Do you both large databases? Unfortunately, there probably isn't much to improve on that. I can make it an option to put the board in maintenance mode, but that could give you an incomplete backup.

If you turn on debug in the options and send me the output of the latest run in a conversation, I'll take a look for anything out of the ordinary.
 
Nice mod here, takes me about 40 min though :p
600,000+ posts /82,000+ members
2x Intel Quad Core Xeon E5606 (4x2.13Ghz)
Code:
[root@ forumbackup]# du -sh /public_html/forum/internal_data/attachments
31GB     public_html/forum/internal_data/attachments
[root@ forumbackup]# find /public_html/forum -type f -print| wc -l
452454
 
Last edited:
Database is 2 GB
That's a long time for just a 2gig database. I'm doing a small release later today of some cleaned up code, no new functionality, but I'll add an option to make closing the board optional.

If/when you install that, can you still send me a debug file in a conversation to look at? I'm curious why it took so long, and why it didn't error out on a php execution time limit.

Is your backup finishing? You said it ran 03:15 - 07:00 a.m, but did it finish? If not, there is probably an error that might be identified by running with debug on.

The 1.0.1 version should make sure your forum is turned back on, whether there is an error or not. Let me know if you see any errors in your server log too.
 
Last edited:
Thanks for your reply :)

I have just started over again with a new test, with only de database.
It took 4 minutes for a complete backup, but it don't closed the forum, and at the time of the backup is the forum not accessible.
forumbackup_15-09-2014-152446.sql.gz. The forumbackup.log is empty
b1.webp
 
Some tips I've used running this myself...

On first install, or update, you can run the add-on manually via the Admin -> Tools -> Cron Entries -> ForumBackup link.
SolidMeanForumBackupManualRun.webp

After running manually and no errors appear, check your backup directory, and make sure that the backup files exist. The addon will verify that the backup files are created, readable, and that they are not 0 length, but it's good to double check at least after the first install. If all else fails, turn on debug and send me the contents in a conversation.

If you run more than one backup a day, make sure to update the Date Format so that it includes the time, otherwise the backup file will just rewrite the existing backup each time it runs that day. Adding His to the date format will include the hour, minute, and second that the file was created. See this link for more date formats examples:
http://php.net/manual/en/function.date.php.

Normally, you'd probably want to set the backup file name once, and keep it, but you can change it if you need to. The filename option currently only accepts alphnumeric characters. The addon will still only keep the number of backups you specify for the database and forum, no matter what the name of the backup is.
 
It took 4 minutes for a complete backup, but it don't closed the forum, and at the time of the backup is the forum not accessible.
forumbackup_15-09-2014-152446.sql.gz. The forumbackup.log is empty

Some questions...
The forumbackup.log is created, but there isn't any data in it? That's strange.
The debug option on the add-on is turned on?
I'm not sure I understand what you mean by "but it don't closed the forum, and at the time of the backup is the forum not accessible"
You receive no server error messages?
 
The forum is turned off while the process is running, you said in the overview. But thats not happend ;)
 
When I can see that the forum is turned off during the backup I will give it another try with the option debug on.
 
When the backup is running, are you viewing the forum as an admin? It doesn't really "turn off" if you're an admin, just for everybody else. The way I tested this is by running the backup, and then using an incognito window to view the forum index, and it shows me that the forum is disabled (and the chosen message displayed) while the backup is running.

If you want to contact me in a conversation with your board information and admin account, I can test it out. Thanks for reporting.
 
Would your script work if the database and the forum directory are on separate hard drive on the same server?
 
Would your script work if the database and the forum directory are on separate hard drive on the same server?

Yes, it should, my database server is on a separate machine than the web server. The mysqldump command doesn't care where the database is stored. As long as the web server has write access to the backup directory you want to use, it shouldn't be an issue.
 
Can I use this to backup the files to my local computer?
Like directory:
C:\Users\name\blabla\Xenforo docs
 
I've been playing with the PECL ssh2 function to enable backups being transferred to another Linux host via scp. It isn't hard to implement, but it requires openssl, libssh2, and the PECL extension, which requires a PHP change.

I don't use unsecure ftp, so that probably won't be an option, but this scp answer is a possibility.

If you are interested in this ssh2/scp transfer option, let me know.
PHP SSH2 function:
http://php.net/manual/en/ssh2.requirements.php

PECL SSH2 package:
http://pecl.php.net/package/ssh2

Dropbox has an API and some examples, but I that requires a little setup also in order for it to work, but we'll see.
 
SneakyDave updated [SolidMean] ForumBackup with a new update entry:

Release 1.0.2 - Mostly cosmetic

09/15/2014: Version 1.0.2
- Cleaned up some option processing code and validation.
- Cleaned up the install routine for future use.
- Putting the board in maintenance mode is now optional.
- Better organization of the admin options (tabs added).

Read the rest of this update entry...

This is mostly a cosmetic change to the admin options, the only new functionality is the option to turn the forum off or not when the backup runs.
 
Top Bottom