Are there any tools we can use to automatically create a backup of file like (php file,css file,asp file) and have an extension name of "index.php.(timestamp)".?This is a common problem for developers or if not common I guess they will like it.

  • Of a single file? – Su' Dec 19 '11 at 4:42
  • @Su' on all file that is edited specially scripts. – cloud 9 Dec 19 '11 at 5:40
  • 1
    You need to edit your question to make whatever you're asking clearer, because I'm not longer sure what that is. If you just wanted to arbitrarily back some file up, you could do that with something like a cron job. If you want this to happen when a file is edited, that's something else altogether(and probably a job for your editor instead of the server). By the time the cron job gets to it, the old version will have been replaced with the new one, so there's nothing to back up. – Su' Dec 19 '11 at 9:50

I would probably not recommend using that approach, at all. Mainly because it can be fragile, confusing, inconsistent, among other things.

Why not use source control? That way you have a centralized and easy way to compare and rollback to previous versions of a page/script/style sheet/whatever.

Other benefits include integration with tools for things like deployment, project management, analytics, etc.

There are free and open source SCC options out there like:

If you're scared of the command line, the above options all have a "Tortoise" GUI that you can use:

There are sites that offer free hosting as well:

If you absolutely positively can't use source control and still want to make backup files like you originally asked, certain editors will automatically do this for you as you edit/save a file. I know that jEdit does this, and you can specify the number of backup files to make and where to put them (same directory, or standalone directory).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.