php forum
php mysql forum
php mysql smarty
 
Topic Options
#280985 - 10/19/04 01:39 PM Database backup and copy
UnixSpot Offline
User

Registered: 06/18/02
Posts: 47
I am looking to do a backup of the ubbthreads database and ftp a copy of it to another server for offsite storage.<br /><br />I would like it to dump the database to a file in a directory that I configure in the script that would be named "databasename-date.sql" it would then gzip the file and then it would ftp it (with specific account settings) to a folder on a different server for safe keeping. It would also be nice if it had a rotation feature where it would only keep the last X number of back up files and delete the older ones. This would be nice to put into a cron job and just have it run everynight at 4am or something.<br /><br />Anyone know of anyway to do this or something that can do this?<br /><br />Thank you!

Top
#280986 - 10/20/04 11:03 AM Re: Database backup and copy [Re: Diamond]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
phpMyBackup is perfect for this - it makes zippled mysqldumps - you can setup a cron to do it automatically. You can download them from the directory on your server and/or FTP them to another server.<br /><br />I run this as an added "offsite" backup for my consulting clients who also host on vetex. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />http://www.ubbdev.com/forum/showflat.php?Number=106649#Post106649
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280987 - 10/20/04 04:42 PM Re: Database backup and copy [Re: Daine]
UnixSpot Offline
User

Registered: 06/18/02
Posts: 47
Josh this looks like exactly what I need. I downloaded it and installed it but when I run it I get this error. <br /><br />Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 5323 bytes)<br /><br />Simple fix?<br /><br />Thank you!

Top
#280988 - 10/20/04 08:58 PM Re: Database backup and copy [Re: Diamond]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Hrmmm.... if the database takes too long to dump, then you'll need to increase the max execution size in your php.ini file.<br /><br />If it's not your server, and you can't change the settings, then you'll find some programs in this thread on servers where timeouts are a problem.<br />http://www.ubbdev.com/forum/showflat.php?Number=116768
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280989 - 10/21/04 01:03 PM Re: Database backup and copy [Re: Daine]
UnixSpot Offline
User

Registered: 06/18/02
Posts: 47
I changed the settings in my php.ini and it worked like a charm. Thank you for pointing that out!

Top


Who's Online
1 registered (Gizmo), 23 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks