Quantcast
Channel: Ola Lindberg » Software
Viewing all articles
Browse latest Browse all 20

Portable backup solution for Windows

$
0
0

I have been thinking about creating an easy solution to backup some files from different computers to thumb drives. I wanted a solution that was portable (so I could run it from the thumb drive) and easy to configure (maximum update one path to copy from and one to copy to).

I decided to give Robocopy (that I use for complete backups) a try. The portable requirement was solved by copying the file Robocopy.exe from the folder C:WindowsSystem32 (in Windows Vista) to my thumb drive. And the easy to configure requirement was solved by creating a Backup.bat file on the thumb drive with the following content:

SET source="D:Code"
SET destination="./CodeBackup"
SET logfile="./Backuplog.log"

SET copyMode=/MIR /XF desktop.ini
SET options=/R:0 /W:0 /LOG+:%logfile% /NFL /NDL

Robocopy.exe %source% %destination% %copyMode% %options%
pause

It copies the folder Code from my D: drive to the folder CodeBackup in the root folder on the thumb drive.

I popped out the thumb drive and stuck it in a Windows XP computer that didn’t have Robocopy installed. I ran the bat file and it didn’t work. It seems like you need to have different versions of Robocopy for it to run in Vista and XP so I downloaded the Windows Server 2003 Resource Kit which includes a Robocopy version that workes in XP. To be able to run robocopy on both Vista and XP I renamed the files to RobocopyXP32.exe and RobocopyVista32.exe. Then I updated the Backup.bat file to point to the XP version when I’m doing the backups from XP and the Vista version when doing backups from Vista. It seems to work fine and is an easy enough solution!


Viewing all articles
Browse latest Browse all 20

Trending Articles