?

Log in

No account? Create an account

TimeCapsule'ish Backups, MySQL

« previous entry | next entry »
May. 21st, 2008 | 06:19 pm

A while ago I blogged about using Mercurial as a backup repository for my databases. I was asked about this again
last night over dinner.

This is an example of what I see via the web:
Picture 13.png



I can see both changes to schema, and do deltas between days (aka slice out a days worth of data or grab a snapshot of anyone one particular days data). The nice thing with hgweb is that I can make this happen via my browser :)

Part of what really makes this work is the --tab option to mysqldump (I also use Innodb so my backups are all done online). I can compress it, but frankly disk is cheap and storing deltas is cheap :)

Link | Leave a comment | Share

Comments {2}

awfief

(no subject)

from: awfief
date: May. 23rd, 2008 02:38 pm (UTC)
Link

The only thing that I've seen people want is not just a diff, but a way to get from one diff to another, and perhaps compression of redundancy with that. For instance, consider the data/schema changes made by:

ALTER TABLE foo ADD COLUMN bar INT UNSIGNED NOT NULL DEFAULT 0;
UPDATE foo SET bar=baz WHERE bap=bop;

It would be nice to be able to have a script that annotates and entry. Folks want to version control both the script and the data, and so it's an odd thing to have script versions in a repository, and only when the script is at the last revision (hence, it was applied) does the data actually change.

Reply | Thread

awfief

(no subject)

from: awfief
date: May. 23rd, 2008 02:38 pm (UTC)
Link

oh yeah, re: compression -- disk is cheap, plus when you want a restore you don't want to have to wait for the uncompression.

Reply | Thread