TinyPortal

General => Chit chat => Topic started by: Ken. on May 18, 2007, 12:16:32 PM

Title: Database Backup Tool
Post by: Ken. on May 18, 2007, 12:16:32 PM
In This Thread (http://www.simplemachines.org/community/index.php?topic=115957.0) over on SMF 'viulian' tells us about a backup application that he has written for your SMF database.

If you are like me and are not totally satisfied with the scripts/cronjob solutions that are available then you may find this one interesting. It can do a backup based on your schedule choices and download it to a specified folder on your computer.
I've only used it for a short time now, but it appears to work well... I like it.  ;)
Title: Re: Database Backup Tool
Post by: G6Cad on May 18, 2007, 12:45:42 PM
Thank you for charing this with us Ken :)
Seems like avery useful tool  :up:
Title: Re: Database Backup Tool
Post by: Nokonium on May 18, 2007, 01:52:10 PM
That looks interesting, I've never noticed that before.  :up:
Title: Re: Database Backup Tool
Post by: Shadow on May 18, 2007, 03:40:35 PM
Good found. This will help tons of people on here or so
Title: Re: Database Backup Tool
Post by: Nokonium on May 18, 2007, 06:30:26 PM
One that I have found to be good is MySQLDumper (http://www.mysqldumper.de/en/) I use the 1.21b6 version, I'm yet to try the latest version MySQLDumper 1.23 Pre-release Revision 227.
Title: Re: Database Backup Tool
Post by: Ken. on May 18, 2007, 09:10:41 PM
Quote from: nokonium on May 18, 2007, 06:30:26 PM
One that I have found to be good is MySQLDumper (http://www.mysqldumper.de/en/) I use the 1.21b6 version, I'm yet to try the latest version MySQLDumper 1.23 Pre-release Revision 227.

And it is a good one! :)
I'm using it on my cpg db and it works good... just need to find a way for it to download the backup file into a folder on my PC... it will send it to you by email and it also has ftp abilities but I've not had a chance to find out if it will do a download to a folder automatically.
Title: Re: Database Backup Tool
Post by: Nokonium on May 18, 2007, 09:48:50 PM
If you can set it up to use a cronjob it will run a backup whether you are online or not, in theory you can then set your FTP client to connect as a backup function and download the backup folder.

I've been fiddling with 1.23 and it is fighting with the server security about who has the htaccess rights.  :(
Title: Re: Database Backup Tool
Post by: Lesmond on May 18, 2007, 09:57:49 PM
Nice find Ken, I posted over at smf that I had downloaded it thanks to you ;)
Title: Re: Database Backup Tool
Post by: Ken. on May 18, 2007, 10:38:40 PM
Quote from: Lesmondâ„¢ on May 18, 2007, 09:57:49 PM
Nice find Ken, I posted over at smf that I had downloaded it thanks to you ;)

;D Hope it works out OK for you Lesmondâ„¢, it sure looks good so far!

@nokonium... the first time I tried MySQLDumper the security thing got screwed so bad that the whole install had to be deleted and started from scratch! Most of their help forum is in German so it's taking a while to sort through and figure out how to set security correctly, so far now mine is still off.

Also, I've asked viulian (java-smf-backup.php) to consider trying to add the ability for backups on a Coppermine db because lots of SMF users run cpg as well. Thats the only reason that I'm running MySQLDumper, because at this point there is no really good way to backup cpg that I can find.
If viulian is able to add that cpg backup to java-smf-backup.php it sure would make it lots simpler to do these backups by making it so one utility could do them all.
Title: Re: Database Backup Tool
Post by: viulian on May 19, 2007, 05:04:47 PM
Hi! Just logged in and wanted to say hello to you guys :)

Let me know if you have issues with the little backup utility.

About the coppermine integration, I just downloaded the 1.4.10 version but I'm skeptic about the success.
If there's no backup utility integrated then the only thing is trying to talk to phpmyadmin directly. It's not difficult, but.. takes time to make it right :)

I'll see what I can do.
Title: Re: Database Backup Tool
Post by: RoarinRow on May 19, 2007, 05:37:16 PM
Very cool I just tested it out.  Is there a way to have the backup save to a directory on a server instead of my PC?   :)
Title: Re: Database Backup Tool
Post by: viulian on May 19, 2007, 05:55:08 PM
Yep, it works, even if I didn't test it before with this scenario :)

You should go to Forums -> Settings... and in the "Backup Directory" text box type something like:

\\192.168.2.103\Share\BKForums

Of course you need to have write access, otherwise you'll end up with a FileNotFoundException/IOException or something Java would throw.
Title: Re: Database Backup Tool
Post by: Nokonium on May 19, 2007, 06:25:30 PM
Quote from: Ken on May 18, 2007, 10:38:40 PM
@nokonium... the first time I tried MySQLDumper the security thing got screwed so bad that the whole install had to be deleted and started from scratch! Most of their help forum is in German so it's taking a while to sort through and figure out how to set security correctly, so far now mine is still off.

I've sorted it now, they called a truce at setting cmod to 755.

For my purposes 1.21b6 did all I wanted (without the above problem), 1.23 has greater support for character sets but that isn't an advantage to me. Being able to schedule downloads for set time would be, if I could set a regular backup via a cron job, but my server doesn't have that.
Title: Re: Database Backup Tool
Post by: Ken. on May 19, 2007, 07:16:19 PM
I saw something about a 'fake cron' somewhere in my travels, can't remember where just now but I'll try to find it... it might do what you need.

Quote from: nokonium on May 19, 2007, 06:25:30 PM
Quote from: Ken on May 18, 2007, 10:38:40 PM
@nokonium... the first time I tried MySQLDumper the security thing got screwed so bad that the whole install had to be deleted and started from scratch! Most of their help forum is in German so it's taking a while to sort through and figure out how to set security correctly, so far now mine is still off.

I've sorted it now, they called a truce at setting cmod to 755.

For my purposes 1.21b6 did all I wanted (without the above problem), 1.23 has greater support for character sets but that isn't an advantage to me. Being able to schedule downloads for set time would be, if I could set a regular backup via a cron job, but my server doesn't have that.


EDIT: that was easy!... just a Google away.  ;)
http://www.quirm.net/page.php?id=28
Title: Re: Database Backup Tool
Post by: Nokonium on May 19, 2007, 07:33:35 PM
Got that, thanks Ken  :up:
Title: Re: Database Backup Tool
Post by: Lesmond on May 19, 2007, 08:08:46 PM
viulian, Welcome to TP, and thanks for dropping by :) hope to see you often
Title: Re: Database Backup Tool
Post by: viulian on May 19, 2007, 08:51:07 PM
Thank you for the welcome :)

I just finished posting a long post on SMF http://www.simplemachines.org/community/index.php?topic=115957.msg1097861#msg1097861

Shortly put:

I'll extend the application so it will be a wrapper over phpmyadmin. That way anyone can backup/restore their databases (no matter what forum it uses, what photo gallery it uses) etc. No need for additional scripts/FTP/chmod/chown, php errors, cront/fake cron, setups etc.

It will take me probably around a month to create this..

Will this solve all the issues :) ?
Title: Re: Database Backup Tool
Post by: Lesmond on May 19, 2007, 08:55:42 PM
sounds real cool, cant wait :)
Title: Re: Database Backup Tool
Post by: Nokonium on May 19, 2007, 09:46:45 PM
Quote from: viulian on May 19, 2007, 08:51:07 PM
I'll extend the application so it will be a wrapper over phpmyadmin. That way anyone can backup/restore their databases (no matter what forum it uses, what photo gallery it uses) etc.

Would that be able to handle large files? phpmyadmin had, last time I used it, a maximum restore file size of 8mb. I have backup files with 'Complete Inserts' and a the file is over 250 mb.
Title: Re: Database Backup Tool
Post by: viulian on May 20, 2007, 05:29:17 PM
Oh, right :) I forgot. I think it's a PHP limitation probably, how much you can upload (how big a file can be), and as far as I know that file is by default 2Mb.

Yah, then there is no alternative than using scripts.. Probably I'll create some that the application will deploy on the FTP server, then call it via web to create a dump file on the directory, then download that file via FTP back to the computer..

The same with restoring the database..

Is this a better solution ?