Personal computing discussed

Moderators: renee, Flying Fox, Ryu Connor

 
Madman
Minister of Gerbil Affairs
Topic Author
Posts: 2317
Joined: Tue Apr 01, 2003 4:55 am
Location: Latvia

Robocopy for backup

Thu Nov 05, 2009 8:20 pm

I am trying to do a backup for c:\users, and I was wondering if I'm doing it right.

The command I use is:
"robocopy c:\users e:\backup /E /ZB /COPYALL /R:1 /W:1 /XJ /LOG+:c:\log.txt"

When I started it in normal mode, I got some errors about inaccessible files, so I restarted into safe mode with command prompt. But since I can't view a log and I don't know how far everything is gone, I decided to also ask. Maybe someone has better knowledge of this tool.

/XJ is the key to exclude junctions, otherwise robocopy goes into infinite loop.

Also, now I'm wondering if the backup folder will be deletable, ever, because those junctions seem to redirect all the time. I'm afraid that if I'll just delete the backup from the e:\ disk, system will start deleting files in c:\users, is that so?

Also while on the topic. I tried to copy the main account folder from Vista system to "my documents" and it stopped at folder already exists, merge? (recursion), so I clicked no. Can I be sure that nothing got overwritten? I don't quite follow that soft/hard link stuff in Vista/7
Core 2 Duo E6300, MSI P45 NEO-F, Club 3D GTX 260, 4Gb DDR2-800Mhz, Audigy X-Fi Fatal1ty Champ1on ed., 0.5Tb+1Tb Seagate Barracuda 7200.12, 630W AXP, Samsung SyncMaster BX2450, ViewSonic VP171b
 
bwoodring
Gerbil First Class
Posts: 102
Joined: Sun Jun 23, 2002 10:20 am

Re: Robocopy for backup

Thu Nov 05, 2009 9:19 pm

This is the robocopy job I use for backup to a local external drive nightly.

@ECHO OFF
"C:\Windows\System32\taskkill.exe" /IM "OUTLOOK.EXE"
"C:\Windows\System32\robocopy.exe" "C:\Users\ACCOUNT" "E:\Backup\ACCOUNT" /MIR /R:0 /W:0 /XD ".VirtualBox" "AppData" "AppFolders" /XJ /XF "ntuser.*" "thumbs.db" /LOG:"E:\Backup\ACCOUNT.log"


Notes:
1. I have it kill outlook first if it is running so that it can backup my current .pst file.
2. This is a local copy, so I set the retry count and timeout to zero.
3. I exclude some folders like AppData because I would not want to migrate that to a new OS install.
4. I exclude .VirtualBox because I backup my VMs weekly with a separate job.
5. I exclude the ntuser.* files so the errors don't clutter up my logs.
6. It's a small thing, but there is no good reason to backup thumbs.db files.
 
Madman
Minister of Gerbil Affairs
Topic Author
Posts: 2317
Joined: Tue Apr 01, 2003 4:55 am
Location: Latvia

Re: Robocopy for backup

Thu Nov 05, 2009 9:48 pm

Ok, the task finished, it skipped like some 386 folders and some files ~100MB total, but the copy seems to be more or less correct.

The only thing I am not sure about is that maybe files I were looking at on drive E: were actually hard-linked to C:, so I checked visually, they were there, but they are not on a backup drive :roll:

Concerning AppData, I noticed that some ancient programs that write saves/settings to "c:\program files" are redirected to some VirtualStore folders which I think were in AppData, although by this point I'm so much confused that I have no idea what's where anymore... :roll:
Core 2 Duo E6300, MSI P45 NEO-F, Club 3D GTX 260, 4Gb DDR2-800Mhz, Audigy X-Fi Fatal1ty Champ1on ed., 0.5Tb+1Tb Seagate Barracuda 7200.12, 630W AXP, Samsung SyncMaster BX2450, ViewSonic VP171b
 
bdwilcox
Graphmaster Gerbil
Posts: 1262
Joined: Mon Apr 21, 2003 12:21 pm

Re: Robocopy for backup

Thu Nov 05, 2009 10:15 pm

I use Cobian backup. It's free and it works very well. It also uses Volume Shadow Copy, so it backs up in-use files, too. The way I use it, I install it as a program (not a service), create the backup tasks I want, then kick it off with a batch file.

The batch file I use is one line:

"C:\Program Files\Cobian Backup 9\Cobian.exe" -bu -m -autoclose

I put this batch file somewhere where it won't get deleted, make a desktop shortcut to it, modify the shortcut to stay minimized when run, then change the shortcut's icon so the user understands it's a backup utility.

http://www.educ.umu.se/~cobian/cobianbackup.htm

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On