MyBB Community Forums

Full Version: task manager/weekly backup versus Cron Job
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
There appear to be a number of ways of achieving a scheduled database backup. I think I am getting mixed up between 1.2 and 1.4 support instructions and Q & A.

I want to do a weekly database backup.
When I set up and try to enable the task I get the message.
WARNING: You are about to enable a task that is only meant to be run via a cron (Please see the MyBB Wiki for more information). Continue?


Should I be creating the weekly backup task (without enabling) and pointing at cron job at the disable task?

I create a cron in cpanel as describe in the forum threads. I've tried a cron with forumsdirectory/task.php4. This does not appear to work. I tried task.php id=4 .

Is the backupdb.php or the task executable via a url as a test?

Also how do you stipulate/congfigure the backup directory?

Sorry to have to keep asking novice questions, but the Wiki is a little skimpy in the backup area.
Backups created by the task are saved to ./admin/backups/ which needs to be CHMODd to 777 for it to work... don't know if this can be changed or not. AFAIK you don't need a cron job, I didn't do anything except enable the task, and the task manager backs up the database fine every day.
(2008-10-29, 06:14 PM)Matt_ Wrote: [ -> ]Backups created by the task are saved to ./admin/backups/ which needs to be CHMODd to 777 for it to work... don't know if this can be changed or not. AFAIK you don't need a cron job, I didn't do anything except enable the task, and the task manager backs up the database fine every day.

Any idea why the warning message is there when I start to enable the weekly backup tasks?

Thanks for the directory info.
I must admit I didn't get that when I just reactivated it... can you post up a printscreen??
I get the warning message when enabling the weekly backup task via the Options button at the right of the task table.

Attached is the screen capture.


[attachment=11528]
Hmm, can reproduce, happens I when I do it like that... if I click the name of the task, or click Options > Edit Task, and enable it via the option at the bottom, there is no warning. Now, whether there should be an option there too is something a developer will have to answer.
I also encounter a warning and my admin dir, I've been renamed it.
You can go ahead and click "Yes". After one or two backups take place I suggest you take a look at them to make sure they are successfully written (they are complete and not corrupted).
If you are running the task via a Cron Job:
  • In the program you use to setup a cron job set it up with the times you want and set the path to: php the/file/system/path/to/task.php x where x is the Task ID you want to run.
  • Make sure it is disabled in the ACP. Enabling it via the Task interface in the Admin CP Only tells MyBB to execute it via it's own scheduling system. Therefore this would cause overlap. The task, if called from a cron job, will run regardless of the status of it in the ACP as this only applies to MyBB's own systems.

You can also test the cron job by using PHP's CLI interface via the same way you set it up for the cron job (e.x. "php the/file/system/path/to/task.php x")

Ryan