UBB.Dev
Posted By: UnixSpot Database backup and copy - 10/19/2004 8:39 PM
I am looking to do a backup of the ubbthreads database and ftp a copy of it to another server for offsite storage.

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.

Anyone know of anyway to do this or something that can do this?

Thank you!
Posted By: JoshPet Re: Database backup and copy - 10/20/2004 6:03 PM
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.

I run this as an added "offsite" backup for my consulting clients who also host on vetex.

https://www.ubbdev.com/forum/showflat.php?Number=106649#Post106649
Posted By: UnixSpot Re: Database backup and copy - 10/20/2004 11:42 PM
Josh this looks like exactly what I need. I downloaded it and installed it but when I run it I get this error.

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 5323 bytes)

Simple fix?

Thank you!
Posted By: JoshPet Re: Database backup and copy - 10/21/2004 3:58 AM
Hrmmm.... if the database takes too long to dump, then you'll need to increase the max execution size in your php.ini file.

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.
https://www.ubbdev.com/forum/showflat.php?Number=116768
Posted By: UnixSpot Re: Database backup and copy - 10/21/2004 8:03 PM
I changed the settings in my php.ini and it worked like a charm. Thank you for pointing that out!
© UBB.Developers