Effective Inexpensive Backups – Part 2 of 5

Goal – Backup of files and folders that existed at one time but have been removed or overwritten. This type of backup protects us from data loss due to human error (deleting a folder or file or overwriting a good file with a bad one).

For this backup we need to copy files and folders that are newer than the ones on the backup. Xcopy will do this, it just requires different parameters. We do not delete or rename the previous backup before adding the changes. This backup will grow slowly and will be slightly larger than the “real” data on the server because we never delete any of the old data. This means that if you make a folder called “proj” on Monday and you change it to “newproj” on Wednesday BOTH of the folders will exist in the destination. If you delete or rename a file or folder on the server that has existed for at least one day, it will still be on the backup. With this setup data loss is unlikely but there are c couple scenarios that this will not protect against.

  1. If you save a different file over the top of a good file on the server and do not realize it . You should be able to recover the file using the method in Part 1 or Part 2, but only if it has not been longer than 6 days.
  2. If you delete or overwrite a file on the server that has existed for less than one day, meaning that it never got backed up..

For the script example, we are interested in two folders:

  • Source – \\server\data
  • Destination – e:\backup\all

Command

xcopy /c/h/e/v/d/y \\server\data e:\backup\all

What it does

Copies any new or changed data to the “all” folder.  The directory structure inside the “all” folder will look exactly the same as \\server\data although it will also include data that has been deleted or renamed. Because of this “extra” data, this backup is a poor choice to restore as a complete set and is mostly used to restore individual files lost/destroyed due to human error.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *