[SolidMean] ForumBackup

[SolidMean] ForumBackup 1.3.01

No permission to download
@SneakyDave I want to run this on a manual basis only so I turned off the cron entries. Is that the proper way to do it, just turn them back on and run them when I need them?

When I ran a manual cron on the forum code the request timed out but it managed to save a 1.6gb file. Should I assume that it completed the task?
 
Yes. That's what I would do for manual backups.

If it timed out, did it generate a server error in the admin area? If not, you should enable the addon's debug and make sure it finishes creating the file.

But if you ended up with a .gz file, you could probably (almost, maybe) assume that it is complete. That's the last step of the backup obviously and I don't think it counts toward the PHP execution limit since it's an external command.
 
Hi, I get this error.


  1. SolidMean_ForumBackup_CronEntry_Backup::saveCode()
  2. call_user_func() in C:\xampp\htdocs\upload\library\XenForo\Model\Cron.php at line 357
  3. XenForo_Model_Cron->runEntry() in C:\xampp\htdocs\upload\library\XenForo\ControllerAdmin\Cron.php at line 213
  4. XenForo_ControllerAdmin_Cron->actionRun() in C:\xampp\htdocs\upload\library\XenForo\FrontController.php at line 351
  5. XenForo_FrontController->dispatch() in C:\xampp\htdocs\upload\library\XenForo\FrontController.php at line 134
  6. XenForo_FrontController->run() in C:\xampp\htdocs\upload\admin.php at line 13

Debug comes back with: http://pastebin.com/pP4nNa3C
 
Your tar and gzip commands can't be found by the add-on.

Is your XenForo installed on a Linux system?
Do you know if you have access to tar and gzip commands to backup your code files?

I'll send you more things to look at in a conversation.
 
I am on windows 2012 server & I have no idea if i have access to them, how do i check?
 
Last edited:
@SneakyDave I'm having trouble getting code backup to work. I am using pigz with /usr/bin/pigz set in "Path to compression utility".
With debug mode on, I run the cron manually and the .tar file is created. The forum then goes offline (Cloudflare timeout error) and never compresses the tar file.
This is in the log,

Code:
2016-06-19 17:05:44 | INFO | START Code Backup
2016-06-19 17:05:44 | INFO | Turning forum off...
2016-06-19 17:05:44 | INFO | Creating the tar file: tar --ignore-failed-read -f /path/to/backup/folder/backups/db_2016-06-19-170544.code.tar -cP /path/to/forum/root/httpdocs --exclude='internal_data/bdcache' --exclude='data/bdcache' --exclude='internal_data/cache'  2>> /path/to/backup/folder/backups/dbdb.log
 
Oh, and am I doing this correctly to exclude folders?

internal_data/bdcache,data/bdcache,internal_data/cache
 
Your directory exclusion looks correct. Have you tried using pigz without specifying the path to it? Will it work using traditional gzip (the pigz option unchecked?)
 
Your directory exclusion looks correct. Have you tried using pigz without specifying the path to it? Will it work using traditional gzip (the pigz option unchecked?)

Yes, tried without specifying pigz path, doesn't work.
gzip works eventually, but still takes the forum offline.
 
gzip works eventually, but still takes the forum offline.
Do you have the option checked to take the forum offline? I don't know how it could do that on a file system backup because there aren't any database calls.

Can you send me a conversation with screen shots of your options?
 
Code backup fails on nearlyfreespeech.net FreeBSD environment.

Cause: FreeBSD's bsdtar rejects the "--ignore-failed-read" switch

Solution: Use gtar instead.

Manual patch:

In plugin: /upload/library/SolidMean/ForumBackup/Options.php

Change lines

// linux assumed, no extension
$this->tarpath = 'tar';

to:

// linux assumed, no extension
$this->tarpath = 'gtar';

WARNING:

This solution is a hack. If you make the above change and then use the modified plugin in an environment other than NearlyFreeSpeech.net, then:

If
1. Echo $tarpath returns nothing, and
2. gtar is not installed, then
3. Code backup will fail.

I hope SneakyDave will write some real php so that the plugin is aware of this limitation of bsdtar, and switches to gtar or drops the "--ignore-failed-read" switch. For reference:

http://lists.freebsd.org/pipermail/freebsd-bugs/2012-October/050285.html
 
I just noticed the option "Path to tar" under "miscellaneous options". It says "Include the full path and name of the binary".

I assume using that would be a better way of to specify gtar, rather than modifying the php.
 
Just set this up, so far so good. Any chance someone could assist me in making the forum closed message more readable?

TheShaveDen.webp
 
I believe the forum message is not controlled by this addon, that is XF properties (it uses the core functionality). So if you go into ACP options and turn off your board, does it still look this way? If so...that's your issue, not the addon
 
Top Bottom