in reply to Move files w/ commit-rollback mechanism?

I built a file upload system called Filexer which does something equivalent this for updating a web server. It is not a journaling system, though it does keep a log like tye mentioned. Not a transaction system but anyway I'll describe our experience with it.

There are a staging server and a live server with various virtual hosts accessible by user permission. The program checks modification dates (md5sums were removed since a converter is run to do a global replace on embedded hyperlinks during conversion). It runs on the live server The other server is accessible as a mounted drive over a datacenter LAN.

The requirement was for both sides to be scanned and only files which are older or nonexistent on the live server are candidates for uploading, likewise only those existing on the live server and not the staging server are candidates for deletion. In fact the ability to roll back was not required.

Some fine points are that it makes subdirectories and ignores protected files, and uses a cygwin version of touch which I discovered can set modification times of uploaded files on the live server in Windows. Selected ranges of access logs are downloaded to a place with ftp permissions and email is sent to the user too. Providing a directory listing was also required.

Anyway if you run the system on the live server and copy everything first to another folder, then replace files by renaming them, the operation should be pretty quick. Faster would be to make symbolic links on your live server for major folders and then switch the one you want with its updated copy instantaneously. Otherwise you may have people accesing a partially updated folder briefly, I didn't find it a big problem since we only handled a very small number of files to be uploaded at once.

I don't know what your purpose is but for us, we had to allow non-technical people to do this work on off-hours. It is far better than depending on some providers' upload request forms. It may sound like some pretty easy stuff but sweating the small points (like NT permissions) can keep you awake for a while. Good luck with your project, it sounds useful.

  • Comment on Re: Move files w/ commit-rollback mechanism?