HostOnNet Blog

backup with robocopy

Looking for Linux Server Admin or WordPress Expert? We can help.

Few days back my pc crashed and do not boot. On boot, it say windows starting then rebooted. In most case, windows will run chkdisk if there is any hard disk problem, in this case, due to corruption, windows it not reaching the point where it check for disk problems.

On going to recovery console, it says problem in reading files from hard disk. I thought all my data is lost. At last, a disk error checking fixed the problem.

I have lot of data on my hard disk. I download lot of stuff from net, but never get time to check it. So have large collection of programs, pdf documents on my hard disk.

Previously i tried to backup with ntbackup, that never worked as i have lot of data and it take lot of time to finish the first backup on another PC on LAN. If remote pc is swicthed off, i have to start the backup again from start.

On searching for a solution like rsync on windows, i found robocopy that work similar to rsync on windows. I am copying files from my pc to a share in another PC on LAN. I can stop it any time, when i run robocopy agin, it will continue copying rest of the files.

The backup command i used to backup data to another pc with name pc14 on LAN is

robocopy I: \pc14backupdrive_i /Z /MIR /R:0 /XD i:os
robocopy d: \pc14backupdrive_d /Z /MIR /R:0 /XF pagefile.sys hiberfil.sys

You can get help of robocopy with

robocopy /?

The /MIR is for mirroring, that is it will make sure all files in local folder is copied to remote, then delete any files that deleted from local from remote also.

On first run, robocopy will copy all files to remote PC, on next run, it only copy files that are changed or new.

Posted in Windows

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.