Sunday, 28 July 2013

How to back up any folder automatically

Regular backups of the complete data are important but are also time-consuming when you have a lot of data. That’s why a weekly interval is usually the default for backup software. If you want to take more frequent backups of a specifi c folder, you can automate the task with a few steps. The command line tool Robocopy, which is included with Windows Vista, 7 and 8, is perfectly suitable for this purpose. Windows XP users can download the tool for free at
First, type ‘cmd’ in the search field of the Start menu or anywhere on the Start screen and then select ‘cmd.exe’. Robocopy needs you to type the source folder and the target folder with the full path and
the additional options you'll need. Use the option ‘/E’ to include all subfolders. It’s possible that some files will be open, so disable the standard retry attempts to prevent the process from stopping midway. For this, the two options ‘W:0 and R:0’ will need to be specified. Lastly, you'll also require the parameter ‘/MOT:n’ for time-dependent monitoring of the source folder; ‘n’ indicates the time between repeated operations if changes to any files are detected. The complete command for backing up your folder every hour will look like this: ‘Robocopy C:\source\folder D:\backup\folder /E /R:0 /W:0 /MOT:60’. Robocopy processes and monitors your system only when the command is executed. To make the computer automatically run the command at startup, create a new text file with Notepad and type the command inside it. Now rename the file so that the extension reads ‘.BAT’. Add this file to the Startup folder of your user account to make sure it runs every time you reboot or log out.
NOTE: You will notice some system lag while files are being copied, especially if the files are very large. As with all backups, the target folder must be on a different drive; preferably an external drive or a network location so that physical disk failures do not result in the loss of both the original and the backup.

No comments:

Post a Comment