From: Stef B. <st...@bo...> - 2008-03-30 12:08:50
|
Michal Ludvig wrote: > Binlog was designed for a totally different purpose and as such is > hardly usable for a convenient revision tracking on mysqlfs. > > For instance you'll have to keep all binlogs from when the FS was > created to be able to "replay" the filesystem to some point in time (and > honestly who keeps binlogs longer then a few days after they get their > way to slaves). > Well, I did not know this way there are backups already available in the MySQL server. I've just read the MySQL reference on the Internet, and it is possible to do binary logging for at least the mysqlfs database. > It would work on the whole-filesystem level, not for particular files > (which may or may not be what Stef wanted). > Yes, indeed. With mysqlbinlog it's possible to go back to a previous version of a database, and copy that one to a temporary database. But this is step one. The next step would be to find the particular file (for a given time). Ok, it's possible this way, but very complicated if you would like to check only one file. But when reacting on your first remark. In my idea I woul like to use the mysql filesystem as a backup, not as a filesystem where users have direct access to. I do understand that when users (or processes) have direct access, there will a lot of changes, which all get maintained... My idea is to only do a copy or a sync of a directory of my choice, for example my homedirectory, once a day (4.30 at night for example), to the mounted mysqlfs. This way not every change will get his way to the database. Of course there should be a policy on how long a version will stay in the database, and there should be some utilities to find previous versions. But that's not the most difficult step I think. Stef Bon |