PDA

View Full Version : Simple MYSQL backup via CNC?


Evoir
08-19-2008, 09:21 PM
Hello,

Was wondering if it was possible or feasable to provide a MYSQL backup utility via the CNC? Currently there is a "rename" and "delete" button. Would be super cool if there was a "backup" button and it backed it up either to the server (based on server path) or down to your computer.

Also wondering if FQ will ever offer phpMyAdmin pre-installed on the servers?

skolnick
08-19-2008, 09:52 PM
I use cron to back-up my MYSQL databases.

#47 3 * * * /usr/local/mysql/bin/mysqldump -uxusername -ppassword -hmysql.domain xdatabasename > /big/dom/xpathnametoabackupfile.sql

Check the knowledgebase for backing up and restoring SQL databases, and for cron.

sail fast, dave

Evoir
08-19-2008, 09:55 PM
Yes, I am aware of a bunch of ways to back up databases... but was just thinking it would be cool and convenient and even a bonus if FQ provided this ability via the CNC.

sheila
08-19-2008, 09:56 PM
These items are on the wishlist and we hope to offer them at some point.

Terra
08-20-2008, 12:11 AM
but was just thinking it would be cool and convenient and even a bonus if FQ provided this ability via the CNC.
There is a problem offering this in the CNC...

The CNC is under the same CPU and memory restrictions that CGI scripts are under... With the large size of many clients databases, it will just end up hitting a brick wall, and if the backup scripts hits the limit there is no way to report back an error because the process has already been killed off... :(

#47 3 * * * /usr/local/mysql/bin/mysqldump -uxusername -ppassword -hmysql.domain xdatabasename > /big/dom/xpathnametoabackupfile.sql

I would recommend piping that through gzip to reduce the file size... My nightly backups will appreciate it... ;)

#47 3 * * * /usr/local/mysql/bin/mysqldump -uxusername -ppassword -hmysql.domain xdatabasename | gzip -9c > /big/dom/xpathnametoabackupfile.sql.gz

skolnick
08-20-2008, 12:01 PM
#47 3 * * * /usr/local/mysql/bin/mysqldump -uxusername -ppassword -hmysql.domain xdatabasename > /big/dom/xpathnametoabackupfile.sql

I would recommend piping that through gzip to reduce the file size... My nightly backups will appreciate it... ;)

#47 3 * * * /usr/local/mysql/bin/mysqldump -uxusername -ppassword -hmysql.domain xdatabasename | gzip -9c > /big/dom/xpathnametoabackupfile.sql.gz

Yasah massah. <grin> I will do.

I should set up a cron job on my home(ish - its actually in the dock box behind my boat) server that pulls the backups off FQ and moves them here. It would be easy to set that up as rotating backups.

Is there a way to tell when the nightly backups run on a particular server so database backups ultimately stored offsite don't take up backup space on FQ?

regards,

Terra
08-20-2008, 07:49 PM
Is there a way to tell when the nightly backups run on a particular server so database backups ultimately stored offsite don't take up backup space on FQ?
There is really no way as the backups are fluid in nature... There are times I may rearrange what server order backups are run against, depending on loading and such...

As it stands now, we are beefing up the backup infrastructure, and each of the OSCAR servers are handling 5 Community Servers each, and all servers are run in consecutive order... So when the backup procedure hits your site depends on the time taken for all other sites prior to yours...

In a nutshell, "no"... ;)

Terra
08-20-2008, 07:50 PM
Ok - well yes...

The first CS backup series fire off at 2:30am ET, so if you have it deleted prior to that, then you will be fine...

skolnick
08-21-2008, 04:29 PM
Ok - well yes...

The first CS backup series fire off at 2:30am ET, so if you have it deleted prior to that, then you will be fine...

Great. I'll put that on my to-do list. I'm sure in the grand scheme of things my little database backups aren't that significant, but if I'm going to keep copies offsite it seems to me that getting off your backups is the right thing to do.