[Nix-dev] What cuold be the nix way updating database versions?

Marc Weber marco-oweber at gmx.de
Tue Jan 6 13:13:48 CET 2009


Problem: Sometimes you have to upgrade databases..

Examples
  Mysql 4 -> Mysql 5
only minor version update:
  Mysql 5.0 -> Mysql 5.1

AFAIK MySQL can handle updates gracefully and using postgresql it's
recommended to export and reimport all data? At least I've read once
that this has been an argument pro MySQL.

nix is very cool because you could ask nix to dump and reimport tables
automatically whenever either the database vesrion changes or the
database store path.

Do you think this makes sense? I mean if you have some big databases (>
500MB) this also means a long downtime caused by maybe unnecessary
database exports and imports?

Do you think this updating trouble can / should be automated at all?

Another way could be
nixos-rebuild --dump-import-mysql-databases

If databses are small it doesn't matter. Then you can do backups very
often and you can dump import all the time.. But if they get bigger
neither approach works that well.

Sincerly
Marc Weber



More information about the nix-dev mailing list