Since Vista’s “Backup and Restore Center” sucks and most backup solutions are bloated, I’m using the very light and built-in Window’s robocopy command to create my backups. Here’s how you can do the same:
- On the backup location (external hard drive), place the code below on a text file named backup-create.bat
- Edit all the lines that start with “call :BACKUP_DIR”. These lines define which folders will be backed up and where they will be put inside the backup folder.
- Double click backup-create.bat to create your first backup.
- When it is done executing you will have a folder with today’s date. This folder will contain all the backed up files.
- Double click the backup-create.bat file whenever you want to create a new backup.
Here’s the code inside backup-create.bat
REM ---- empty out the existing log file
type NUL > %logFile%
REM ---- Copy stuff in the user folder
call :BACKUP_DIR %backupFolder%\00-mine C:\Users\pete\Documents\00-mine
call :BACKUP_DIR %backupFolder%\Desktop C:\Users\pete\Desktop
call :BACKUP_DIR %backupFolder%\FileZilla C:\Users\pete\AppData\Roaming\FileZilla
REM ---- Copy Pictures, Music, and Movies
call :BACKUP_DIR PICTURES T:\Pictures
call :BACKUP_DIR MUSIC T:\Music
call :BACKUP_DIR MOVIES T:\Movies\saved
REM ---- timestamp (datestamp) backup folder
powershell Rename-Item %backupFolder% (Get-Date -format yyyy-MM-dd)
goto :EOF [Return to OS]
echo BACKING UP %2 INTO %1
robocopy %2 %1 /256 /S /NP /XA:H /R:0 /XJ /LOG+:%logFile%
goto :EOF [Return to Main]
This is a brief description of the robocopy parameters:
- The command already ignores files that exist in the destination and look just like the source. Meaning it only copies a file it does not exist in the destination or if it different than the source.
- /256 Turn off very long path (> 256 characters) support.
- /S Copy sub-directories
- /NP Don’t log progress (%)
- /XA:H Will skip copying any hidden files. – this did not ignore hidden folders!
- /R:0 Do not retry to copy a file if there is an error (file is in use)
- /XJ Exclude Junctions (this includes /XJD and /XJF). Junctions are a kind of file or folder link. – I’m not sure if this was really needed.
- /MT[:n] Do multi-threaded copies with n threads (default 8). This takes advantage of all your processor cores. This makes my two core computer run slow, so I’m not enabling it.
The majority of us computer users just want to back up EVERYTHING we have on our Documents folder. And Vista’s built in utility cannot do this for us.
The first backup choice it gives you is whether you want to back up some files or make a copy of your entire hard drive.
If you want to back up your documents folder, you would think that “Back up files” would do the trick. And it almost does, but it has a terrible gotcha: It does not back up EVERY single file on the folder you specify. It only backs up the following:
This does not include *.exe , *.msi , *.bat and others. I’m a software developer so I have weird exe’s and msi’s that were hard to find and a lot of .bat files that I hand wrote.
So this leaves this utility be absolutely useless for me and for many, many people. I guess it’s better than nothing but you will lose information if a catastrophe hits you.
Another thing I did not like is that each time you created a new backup, you were really just throwing all of your files in a “bucket”. If a file with the same name and location already existed in the bucket, it would get overwritten. But files were never taken out of the bucket. So when you did a restore, your restored files would include files you had deleted from your computer but were kept in the backup bucket.
In short, it is a piece of junk. I only wasted my time figuring out how it works. I’m going back to the way I did backups before: Using a backup utility that came with my HP external hard drive.
UPDATE: I ended up cooking up my own solution using the robocopy command.