There are lots of backup solutions out there but a lot of them seem to be overly complicated to me. A lot of the software we have now days seems to be overly complicated but that is a rant for another time. That is why I started using a simple
If you are looking for backup options for Linux I have a post about Rsync you can check out. Otherwise, keep on reading! 🙂
I have always been a little obsessive when it comes to backups but I have never lost data I could not get back. So I guess that means I am lucky or I am doing something right.
Organize Your Files To Make Backups Simpler
The first step is to make sure your files are well organized and not scattered all over your computer. Otherwise, it is easy to miss things and you end up not having them backed up.
For example, I try to save everything in my documents folder other than pictures and music. This way I can just back up the documents folder and know I have almost everything.
Ones your files are organized into just a few locations then you only have a few places to backup. It makes things much easier to work with.
My Robocopy Backup Routine
I have a simple backup script on my desktop. When used it starts to
I have a script like this on all my computers copying to their own folder on the network share.
Then I have another script that
Then the last step to my
Making Your Own Robocopy Backup Script
Ok so now that you know my process lets show you how to make your own script.
Robocopy is very easy to use. You just have to open up a command prompt and type the command or save the commands to a .bat file to be clicked later.
If you open a command prompt and type robocopy it will give you some info on how to use it.
And here is an example of copying my documents folder to my network share.
robocopy "C:\Users\Zack\Documents" "\\10.16.20.5\nas\Backups\Zack\Computer Backup\Documents" /MIR
And here is how you could backup to an extra hard drive. You could also point this to a USB drive if the data will fit on it.
robocopy "C:\Users\Zack\Documents" "D:\Backup\Documents" /MIR
I use the /MIR option to mirrors the source folder. There are lots of other options too but I have only ever needed a few of them.
I have used “/XJD” and “/XJF” to keep my backup clean by ignoring junction points in the file system. But nowadays I do not think this is a big deal. I still have it on my saved scripts but I don’t use it when typing a command in.
The other one I have used is to limit the retry attempts. /r:<N> Specifies the number of retries on failed copies. The default value of N is 1,000,000 (one million retries).
If a file is being used you may want your script to move on instead of waiting forever.
Things to watch out for
Always double-check the command before you hit enter. If you reversed the source and destination then all the files you want to backup could be deleted.
I have also noticed some file system issues creeping in on my big hard drives. Maybe because my backup is so big, the disk was getting full, or NTFS is not very good. I am not sure at this point.
Whatever the case I decided to add a check disk command to my script to catch any problems before they get worse.
CHKDSK D: /F /V
I also run a file integrity monitoring script to check for file corruption.
One more thing to watch out for is there is no file versioning when backing up files with
My Backup Script
Here is the script on my desktop to backup to my network share. REM stands for remark and is just a way to comment your code.
robocopy "C:\Users\Zack\Desktop" "\\10.16.20.5\nas\Backups\Zack\Computer Backup\Desktop" /MIR /XJD /XJF robocopy "C:\Users\Zack\Documents" "\\10.16.20.5\nas\Backups\Zack\Computer Backup\Documents" /MIR /XJD /XJF robocopy "C:\Users\Zack\Music" "\\10.16.20.5\nas\Backups\Zack\Computer Backup\Music" /MIR /XJD /XJF robocopy "C:\Users\Zack\Pictures" "\\10.16.20.5\nas\Backups\Zack\Computer Backup\Pictures" /MIR /XJD /XJF REM Game Backups robocopy "C:\Games\Steam\steamapps\common" "\\10.16.20.5\nas\Backups\Zack\Computer Backup\Steam" /MIR /XJD /XJF REM SVN Server robocopy "\\10.16.20.4\svn" "\\10.16.20.5\nas\Backups\Zack\SVN Server" /MIR /XJD /XJF REM Game Saves robocopy "C:\Games\VtMB\Unofficial_Patch\save" "\\10.16.20.5\nas\Backups\VtMB Saves" /MIR /XJD /XJF pause
And here is the script to backup the network share to a hard drive.
CHKDSK D: /F /V robocopy "\\10.16.20.5\nas" "D:\NAS Backup" /MIR /XJD /XJF REM Save the date and time of the last backup to a text file on the drive. echo %date% %time% > %~dp0LastBackup.txt pause
I will still recommend a cloud backup as a final line of defense. There is always a chance that a major disaster will destroy your house and backups.
You could put the cloud backup software on the computer hosting the network share. Or if one of your backup hard drives is in your computer then the cloud backup software could run on your computer.
Then you still have the benefits of a cloud backup for all your devices. But you only have to install, manage and pay for the software on 1 computer. Then use the simple
I personally use a combo of
But for other big data, I only use my
What do you do for backups?
This is what I do but it may not be the best. How do you backup