|
|
Joined: Jun 2002
Posts: 47
User
|
User
Joined: Jun 2002
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.
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!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
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
|
|
|
|
Joined: Jun 2002
Posts: 47
User
|
User
Joined: Jun 2002
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.
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 5323 bytes)
Simple fix?
Thank you!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
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
|
|
|
|
Joined: Jun 2002
Posts: 47
User
|
User
Joined: Jun 2002
Posts: 47 |
I changed the settings in my php.ini and it worked like a charm. Thank you for pointing that out!
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 21,079
Joined: March 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|