Page 1 of 1

Backup, Backup and BACKUP!

Posted: Wed Nov 19, 2014 9:08 am
by faris
I thought I'd share this with you all...

Instead of deleting just one domain in a Customer's account, I deleted the entire customer.

This happened because of the stupid way Plesk 10.4.4 has a Remove button at the top of the page (which removes the client) and at the bottom of the page (which removes the ticked domains). I clicked on the wrong one :-(

Now I do have backups. And I backup those backups to a different local server. And I backup those backups to S3.

But I only backup weekly, and it so happens that this client had made a huge change to their website yesterday.....including a big new database filled with loads of data, blah blah....

I'm good friends with the web developer who had done the site, thankfully, but he's still mad as hell with me. I've managed to cost him many hours work.

So why don't I do daily backups? Well, I figured weekly was enough, with them going back 3 months. I was wrong :-)

Re: Backup, Backup and BACKUP!

Posted: Wed Nov 19, 2014 9:48 am
by scott
So if you had ASL configured to watch /var/www/vhosts/ you will have backups of that under:

/var/ossec/queue/diff/local/var/www/vhosts/<domainname>/

Its a bit more forensic-centric than a pure copy and paste of a tree, but Ive used this many times to recover lost data. You'll see the old versions of files are named by their epoch timestamp.

Internally we use venerable rdiff-backup for incrementals.

Re: Backup, Backup and BACKUP!

Posted: Thu Nov 20, 2014 6:07 am
by faris
That's interesting. Thanks Scott.

/var/www (or /var/home as it is on this one) aren't in the watchlist. Nor is /var/lib/mysql where there was an important database which had also been updated that day. I guess it would use a heck of a lot of space if they were though (and I'm not sure how databases would be handled by a diff).

Re: Backup, Backup and BACKUP!

Posted: Thu Nov 20, 2014 8:17 am
by prupert
I would say:

- MySQL backups: periodic mysqldumps + binary logs. If you do not have a hot stand-by, just transfer the binary logs frequently to another location. This gives you useful logical database dumps, as well as point-in-time recovery, as well as almost realtime backups.

- File-level backups: at least daily, via BackupPC or rdiff-backup; preferably to an off-site location.

- ASL watch var dirs with OSSEC: I would not recommend it for backup purposes, there are much better and more efficient methods. It's a great tool to record changes though, at the cost of some extra disk io.