[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4511: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4512: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4513: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Support Incident Tracker Forum • View topic - [PLUGIN] Backup Plugin (tms_backup)

[PLUGIN] Backup Plugin (tms_backup)

Discuss and get help with plugins. Share your ideas for future SiT! features.

[PLUGIN] Backup Plugin (tms_backup)

Postby Tomse » Fri Feb 26, 2010 8:33 pm

Hello everyone.

lee.todis posted recently a batch script to backup sit.
this inspired me to first make a script for *nix as well, and now a plugin within SiT.

Download page
http://sourceforge.net/projects/sit-plu ... ms_backup/

The release is a rather big release so I've made it into a tar package instead, since now it consists of several files.

You can read about the plugin in the wiki Tms_backup.

News:
Triggers for success/failure has been added (don't forget to configure them)
Page to show previous backups
Purge in the scheduler to delete old backups
Autodetection for compression and mysqldump (*nix only)
Manuel backup

I've made some extensive testing, but if you find a bug, please reply to this post, or post it in mantis (choose incubator from the pulldown menu in the upper right side)
any feedback and/or suggestions are welcome.

Why am I posting this on the forum? you might ask
Well I'd have to say that everyone who uses SiT in production would want a backup of their data, and here is the best place to announce such.
Attachments
dashboard_tms_backup.png
Preview of the dashlet
dashboard_tms_backup.png (5.62 KiB) Viewed 4960 times
Last edited by Tomse on Wed Apr 09, 2014 12:34 pm, edited 6 times in total.
Reason: Made sticky
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Backup Plugin (tms_backup)

Postby joce » Thu Jun 17, 2010 8:28 am

Hi,
It's a real good idea.
I try it to configure yesterday for a backup the night at 23:00
I arrived this morning and nothing append. I launch the auto.php and the backup work.
I thing there is something i didn't understand between the sheduler and the auto.php ;)
joce
SiT! Regular
SiT! Regular
 
Posts: 43
Joined: Mon Jun 14, 2010 2:29 pm
Location: France

Re: Backup Plugin (tms_backup)

Postby Tomse » Thu Jun 17, 2010 9:38 am

the scheduler can only run if you've setup auto.php in cron or similar

SiT doesn't know the time unless it is triggered by something, which is auto.php

the scheduler is basically out-of-order if auto.php isn't run.

if you setup a job to run every 1 hour in the scheduler, but not scheduled the auto.php to run at all.
then it doesn't run.

if you then run the auto.php once a day, the job you setup in the scheduler will only run then auto.php is fired because it's behind in schedule.

said in another way.

auto.php tells the scheduler to check it's list if something needs to be run, if there is a job that is due execution it'll run it, if something is long past it'll run.
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Backup Plugin (tms_backup)

Postby joce » Thu Jun 17, 2010 9:57 am

So, if I understand well: if my job must be done at 23:00, I must launch auto.php at 23:00 to.
joce
SiT! Regular
SiT! Regular
 
Posts: 43
Joined: Mon Jun 14, 2010 2:29 pm
Location: France

Re: Backup Plugin (tms_backup)

Postby Tomse » Thu Jun 17, 2010 10:43 am

I'd suggest that you run auto.php every minute
i.e.

*/1 * * * * /usr/bin/php -f /var/www/sit/auto.php


or how your installation looks like :-)
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Backup Plugin (tms_backup)

Postby ivanlucas » Thu Jun 17, 2010 11:34 am

Just to add to what Tomse said, the Scheduler within SiT! determines when a job should run, this will only work properly if auto.php is run regularly (ideally every minute). auto.php will decide what jobs need to be run by looking at what you've set on the SiT! scheduler page, SiT! -> Configure -> Scheduler.
Ivan Lucas, Project Lead, Support Incident Tracker (SiT!) GPL. ......... Chat live on irc, #sit on freenode.
Help free software: Make a donation to the SiT! project or Join the Free Software Foundation as an Associate Member.
User avatar
ivanlucas
SiT! Developer
SiT! Developer
 
Posts: 998
Joined: Sun Feb 01, 2009 9:49 pm
Location: Derbyshire, UK

Re: Backup Plugin (tms_backup)

Postby joce » Thu Jun 17, 2010 12:14 pm

Ok i'll do it every minute. It will be ok like that.
Thanks for your help.
joce
SiT! Regular
SiT! Regular
 
Posts: 43
Joined: Mon Jun 14, 2010 2:29 pm
Location: France

Re: Backup Plugin (tms_backup)

Postby Tomse » Thu Jun 17, 2010 12:19 pm

you're welcome .-)
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: [PLUGIN] Backup Plugin (tms_backup)

Postby smipx013 » Wed Sep 01, 2010 1:54 pm

Hi Tomse,

I like it - thanks for developing. I have a question though. I have set everyting up and it is running however it is only copying the website files. I am a bit confused as to what I need to do to get the database dump to work.

I so far have a blank file called mysqldump in my backup directory. Do I need to put some SQL commands in that file so that your script can backup the database? If so then where do I generate this from (or is it a simple "Backup Database xxxxxxxxx".

Thanks
Paul
smipx013
SiT! Fan
SiT! Fan
 
Posts: 18
Joined: Fri Aug 27, 2010 3:46 pm

Re: [PLUGIN] Backup Plugin (tms_backup)

Postby Tomse » Wed Sep 01, 2010 3:09 pm

Hello Paul :-)

you need to set the path (and path only) in the config page of the plugin, of where mysqldump is located.

you can turn on debugging and it will tell you if any errors occur.

in the debug log look after "tms_backup". I've added this to make it easier to detect messages from the plugin in the debug logfile.

if you are in doubt of whats wrong, please post the messages here (stripped for any private info).

to do some testing I can recommend you to disable auto.php running in the cronjob and then manually run php -f auto.php..

cheers
T
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Next

Return to Plugins & Extending SiT!

Who is online

Users browsing this forum: No registered users and 1 guest

cron