0

我正在开发的应用程序会随着使用动态生成文件。这使得分段、开发和生产之间的备份和同步成为一个真正的巨大挑战。我们可能会获得平滑解决方案(如果可行)的一种方法是拥有一个脚本,在备份数据库时可以备份数据库内动态生成的文件,并且在恢复时可以将这些文件从数据库中取出并放入再次文件系统。

我想知道是否有任何可用的(付费或免费)应用程序可以用作脚本来实现这一点。

基本上如果我有

/usr/share/appname/server/dynamicdir
/usr/share/appname/server/otherdir/etc/resource.file

然后把上面的例子和脚本放在mysql数据库上。

如果您需要更多信息,请告诉我。

4

2 回答 2

1

Do you mean that the application is storing a files as blobs in the MySQL database, and/or creating lots of temporary tables? Or that you just want temporary files - themselves unrelated to a database - to be stored in MySQL as a backup?

I'm not sure that trying to use MySQL as an net-new intermediary for backups of files is a good idea. If the app already uses it, thats one thing, if not, MySQL isn't the right tool here.

Anyway. If you are interested in capturing a filesystem at point-in-time, the answer is to utilize LVM snapshots. You would likely have to rebuild your server to get your filesystems onto LVM, and have enough free storage there for as many snapshots as you think you'd need.

I would recommend having a new mount point just for this apps temporary files. If your MySQL tables are using InnoDB, a simple script to run mysqldump --single-transaction in the background, and then the lvm snapshot process, you could get these synced up to less then a second.

于 2008-12-30T21:05:23.987 回答
0

使用 PHP、perl、python 等应该是微不足道的。你在找人为你写这个吗?

于 2008-12-19T15:23:06.590 回答