Forum Moderators: phranque

Message Too Old, No Replies

The 'WebMaster Backup' Discussion

         

FreeStyleMan

10:13 am on Oct 31, 2010 (gmt 0)

10+ Year Member



Okay, let's put our heads together, there are a lot of people out there with no shell access, with no control panel and only a CLI, and there are people on shared hosting and all the way up to dedicated servers.

How do we recommend the various people to make back ups on a frequent basis?

If possible, get a VPS or Dedicated solution, so you can SSH in, and use PHP or Bash from the CLI, and guarantee a complete and full backup. And make a crontab to run it daily, and another crontab 2 hours later to copy a backup to a remote offsite location.

Since I run multiple databases on my server, I tend to use a script that dumps all the databases;

However, this doesn't cover the /home/* directories.

FreeStyleMan

12:49 pm on Oct 31, 2010 (gmt 0)

10+ Year Member



None of the users here has any experience on this? :|

ergophobe

11:10 pm on Nov 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't know - I always use a cron job and typically send an email with a gzipped version of the DB if it's small enough. Poorman's backup. Wouldn't work for a site with tons of data, but only one DB I have is too big for this. I suppose you could send it a few tables at a time.

If I didn't have shell access, I guess I'd write a PHP script that would fire upon request.

thecoalman

9:40 am on Nov 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



However, this doesn't cover the /home/* directories.


Assuming you mean file backups? I use ipswitch for FTP and it has a sync utility that I run nightly. I have one folder that constantly gets new files from user uploads. Up to about 8 gigs and since the sync utility only downloads new files it's very efficient.

FreeStyleMan

10:31 am on Nov 2, 2010 (gmt 0)

10+ Year Member



On top of this, could we provide a reminder plugin (should be easy) to backup the site? Perhaps it could have a setting the user can change to remind them once every day/2 days/3 days/week/2 weeks/monthly?

If there's a thread link to share with people, the reminder could also link to the steps they should take. Not sure of this idea though

RP_Joe

11:35 am on Nov 2, 2010 (gmt 0)

10+ Year Member Top Contributors Of The Month



There are many people who never backup. This should really be a big topic.

Right now the shoemoney website is blank. Brand new Apache server !

I use a FTP and export mysql from phpmyadmin. I ignore comments.
I only use static html and wordpress. Someday I will use a wordpress plugin.

.

maximillianos

1:57 pm on Nov 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We have a secure remote ftp space created by our ISP. We then setup cronjobs to dump our database, compress it and ftp it over daily. We also compress our website files and back them up daily as well.

We keep a running 7 day backup on our ISP backup server, and then we do one monthly backup to our system at home.

It has definitely come in handy a few times that I had to resort back to an previous version of a script, or when our server got hacked last year, etc.

If I was to make any improvements, it would be to automate a weekly backup as well that rolls every 4 weeks. So we'd have 7 days of backups, and then 4 weekly backups, and the monthly backups at my house.

That would be ideal for us. But I just haven't had the time to finish it! Famous last words! ;-)

FreeStyleMan

1:54 pm on Nov 5, 2010 (gmt 0)

10+ Year Member



The database can be quite easy by using some script. I personally use a cron with the following command.

mysqldump --opt -Q -u USERNAME --password="YOURPASSWORD" DATABASENAME > /SERVER/PATH/TO/STORE/backup.sql

I am just wondering if we can create the same method for the HOME directory?

Do we really need the whole Home or just the data and internal data folders as that is where the attachments and avatars are stored?

lammert

4:54 pm on Nov 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Which part of your webspace you have to backup depends on your restore procedure, once a disaster happens. If your website is built around a standard CMS you may get away with only backing up your data files. But if your site is custom coded, has special configurations or uses a large number of plugins, it may be better to create a full backup.

The only way to know for sure is to hire separate webspace for a short period and try to restore your site from scratch in that new webspace. You may discover that your backup needs to include more files than what you thought. Especially config files for MySQL, PHP and system password files are often forgotten, but they may be essential to restore a site to its original state.