Backup data, Windows 10
From Andreida
Goal
- We want to connect an USB hard disk and backup our data to it with the least work that is possible.
- We want to have a certain number of revisions where older ones are not kept to have enough space for more backups.
- We want to be able to get data from the backup without having to go to university.
- We want it cheap.
- We'd prefer an easy setup
- We'd prefer at least some kind of compression to save some space.
Get the backup program
- Get FreeFile Sync
- Install it
- Keep the installer
Prepare the hard disk
The Connection
- Connect the USB hard disk to your PC
- Use a connection which is working
- Some USB 2.x hard disks do not work well from USB hubs, but must be connected directly to the PC. In most cases this happens when the disk does not have its own power supply.
- If you are a rich/lucky/thoughtful bastard you'll have a PC with USB 3.x and an USB hard disk with USB 3.x. First: I hate you! Second, use the correct port on your PC to really use USB 3.x.
- Make sure it is a position where you can connect easily each time you want to do a backup.
- Use a connection which is working
- Remember where you connect the USB hard disk, you should use the same USB port for the same device as often as possible. That is of course only if you want things to work more often.
Formatting the USB hard disk
- Right click the Windows Start button
- Select "Disk Management"
- Find your USB hard disk
- If you don't see it "Menu/Action/Rescan disks"
- If you still don't see it, consider to use a different USB port on your PC.
- Make ABSOLUTELY sure you look at the correct disk!
- Right click the disk to get the context menu
- Select "Format..."
- Volume label: Backup
- File system: NTFS
- Allocation unit size: Default
- Perform a quick format: yes (consider "no" here, IF you have the time. If the last real format was a long time ago or never, use "no")
- Enable file and folder compression: yes (make sure this is active, because we will not use any compression later)
- Press "ok" and format the disk.
- A USB 2.x USB disk with 2 TB took something like 6 hours for me when I did not use the quick format but the real format. USB 3.x should be way faster. Way way. :-)
- Select "Format..."
- Wait until the format is done. With quickformat we are talking about seconds, normal format takes minutes to many hours.
- When you select a letter for access to your USB disk (context menu/change drive letter and paths...) keep in mind you will perhaps in 2 years connect the USB disk and not remember what it is. Don't do fancy stuff like B: for backup or D: because it is near C: or whatever crazy things people think. Use a letter late in the alphabet so no other connected devices will use it. In the following we will just assume you used Z:.
Prepare the files and file structure
- The USB hard disk should now be empty (if you see "System Volume Information", ignore it)
- Copy the "FreeFileSync_xx.x_Windows_Setup.exe" to the root of your USB disk, Z:\
- create the following folder structure: (desktop-data is just an example for the first backup you prepare. Even if you currently don't expect to use this hard disk for other backups, prepare for the unlikely case that things happen and do it my way.)
Z:---backup----desktop-data------current |------revisions
You should not need this but just in case you do not use TotalCommander(why?):
Z: cd \ mkdir backup cd backup mkdir desktop-data cd desktop-data mkdir current mkdir revisions
Backup
- Start FreeFileSync (NOT the setup, the one you installed on your PC)
- It should look like the follwing:
- In (2) you now browse to the directory you want to backup
- In (3) you now browse to "Z:\backup\desktop-data\current".
- Press the cogwheels in (2)
- Select a variant: "File time and size" (should be default)
- Ok
- Press the cogwheels in (3)
- Select a variant: Mirror
- Delete files: Versioning
- Naming convention: Time stamp(Folder)
- Move files to a user-defined folder: "Z:\backup\desktop-data\revisions"
- Maximum: 5 (here you can use what you need, perhaps you prefer "last x days"?)
- ok
- In (1) select the last icon ("Save as batch job...")
- Save as...
- Z:\backup-desktop-data.ffs_batch (yes, directly in the root)
- save
- close FreeFileSync
- use your TotalCommander/FileExplorer/Whatever to browse to Z:\ and double click "backup-desktop-data.ffs_batch"
- Wait until you get the success message (depending on data size and USB 2.x or USB 3x from seconds to days)
- Check the folder "z:\backup\desktop-data\current\"
Now you should have a mirror of your data on a compressed drive where you can update the mirror and keep a number of revision with a simple double click.
Perhaps you'd prefer to not have your backup disk connected to your PC all the time. You know ... viruses don't do "oh, it's the backup disk, I'll not touch it then".
Misc
Run script before backup
If you want to run a script before the backup, for example to dump svn repositories do a directory which will be part of the source for the backup, then look no further:
- Create on your USB disk a bin directory, for example Z:\bin
- move the backup-desktop-data.ffs_batch and the .exe installer into the bin directory
- create inside the bin directory something like "Z:\bin\dump-svn.cmd":
@echo off svnadmin dump D:\data\repos\svn\personalData > D:\data\repos\svn\_dump\svn-personalData.dump svnadmin dump D:\data\repos\svn\src > D:\data\repos\svn\_dump\svn-src.dump echo - all svn repositories have been dumped -
- make sure dump-svn.cmd works as intended
- create in the USB disk's root directory a script like backup.cmd
@echo off cd bin call dump-svn.cmd call backup-desktop-data.ffs_batch
- Double click the backup.cmd to do backups from now
Problems during restore
too long paths
If files can not restored because of "too long paths" or something like that: http://wiki.andreas-duffner.de/index.php/Windows_10#Long_Paths