Backup, Backup and BACKUP!

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Backup, Backup and BACKUP!

Unread post 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 :-)
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8330
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Backup, Backup and BACKUP!

Unread post 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.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Backup, Backup and BACKUP!

Unread post 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).
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Backup, Backup and BACKUP!

Unread post 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.
Lemonbit Internet Dedicated Server Management
Post Reply