Jump to content

How do you backup your database - regularly?


Recommended Posts

Posted

I am curious to know how other people backup their databases on a regular basis? Currently I use a cron job (because I am too lazy to do it manually), it backs up the database and then gzip's it. However I have been having a problem over the past couple of weeks with very erratic and incomplete backup sizes. The database is just under 400MB in size and I am running my board on a dedicated server. Looking at server stats the memory and cpu averages seem to be fine, never a problem, so I don't quite understand why a backup should be say around 67MB then the next backup is 41, 8, 11, 30, etc. Any ideas?

Ted.

Posted

have a cronjob setup to run a shellscript in the small hours.
1.runs a sqldump of the DB splitting the posts table into a separate script,
2. tars it up with a datestamped filename
3. removes the sql scripts after
4. ftp's it offsite to a storage server.

nothing fancy but was easy to create and works well.

Posted

I have a crontab:


0 3 * * * cd /root/ && sh backup.sh

that does the following:


#!/bin/bash

TIME=$(date +"%m-%d-%y")

cd /root/backup/

mysqldump USER1_DB1 > USER1_DB1_$TIME.sql

gzip *.sql

scp -l 85000 -P PORT * root@BACKUP.SERVER:/root/backup/

rm -rf /root/backup/*

exit

Posted

I use a free open source app on OS X called Sequel Pro http://www.sequelpro.com/
It does everything one needs for mysql management.
I back up once a week and every time before making changes manually to the database

Otherwise my hosts backs up every night

Posted

have a cronjob setup to run a shellscript in the small hours.


1.runs a sqldump of the DB splitting the posts table into a separate script,


2. tars it up with a datestamped filename


3. removes the sql scripts after


4. ftp's it offsite to a storage server.



nothing fancy but was easy to create and works well.




I have no experience setting up cronjobs. Any chance you can PM me some details on this so I can get my DB backing up daily to my Amazon s3 bucket?
Posted

I run direct admin on all my servers... for busy sites I run it twice a day...all through the CP... one stays on the server, one goes to a NAS at the data center. These are complete site backups... for non busy sites I run it once a week or day depending on the site and store both locally and to a NAS.

Posted

I run direct admin on all my servers... for busy sites I run it twice a day...all through the CP... one stays on the server, one goes to a NAS at the data center. These are complete site backups... for non busy sites I run it once a week or day depending on the site and store both locally and to a NAS.




Same here full backups using DA.

My backups are nightly straight to Amazon s3 storage.




Can you please post some guide on how to setup AS3?


Thank you.
Posted

Same here full backups using DA.






Can you please post some guide on how to setup AS3?




Thank you.




If your using DA, just use the FTP method... and enter your cloud ftp info...
Posted

If your worried about security of transferring the files.. then I would recommend an internal NAS at your datacenter. Most offer some sort of internal backup system, that's not exposed to the net.

Posted

This is the syntax I use for the cron job on my server - hopefully it is useful to others...

cd /home/george/www/backups/ ; mysqldump --opt --user=uxxxxxxxx--password=xxxxxxxx d42423582 | gzip -v9 - > d42423582-`/bin/date +%y%m%d.%H%M%S`.sql.gz



Ted.

Posted

I do a full site backup every night and a database backup to RackSpace :smile:




How do upload it on other website? Does anyone got any crob job for dumping DB every night and uploading on some other FTP every night? Dumping should add date suffix at the end.

Thanks

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...