I am planning our backup strategy in a mixed enviroment (Windows File Server, Linux Samba Server, MS desktops). The target is to use such backup which for dektops uses shared folders as mapped drives on windows server. On windows server there are several data partitions which should be backup-ed to the Linux file server. One mapped backup device on SAMBA should be synchronized with the windows data partitions.
Since this is a big collection of data (200-300GB) it is not a good idea to copy all the data again and again each day. This is why I am trying to use robocopy instead of Windows Backup utility on MSW Server. (I am used to use rsync for this on my Linux servers).
Because I would like to investigate thoroughly whether the built in Windows Backup on MS Windows Server is capable of such tasks, I list here the pros and contras for robocopy. I don't have much experience with the windows built-in backup capabilities and I don't want to use something what would not do its job correctly.

- I would like to backup only the new data, i.e. incremental backup to not to send 300G of data each day on network
- If there is a problem with the connection (in the middle of the backup process) or some other problem (windows cannot read some files) robocopy should continue to backup if the network is back and skip files that it can not access
- Do the copy whether there is some user loged in or not
- Possibility to simply check wheter the update is correct - check the file tree in the backup storage (no need to unpack archives, backups). It gives a good feedback about wheter the backup is working correctly
- Log the process of backup, where I can look later for reasons of possible problems that may have appear

These are the main advantages which robocopy gives me. I would like to know whether it is possible to do this with the built in Windows Server Backup utility.

Further, I have one problem with robocopy. I created a .bat script which is scheduled in the windows server for everyday execution. The problem is that the script is executed only when a user is logged in. If the user is not logged in the mapped shared drive is not connected (Z: in my case). So it cannot access the backup target directory. I found this suggestion on google:


This should be inserted before the robocopy command (this should connect the network-drive). It didn't work - I don't know why. I tried the same command on cmd.exe where it worked. (although I had to disconnect the actual alive connection first which is automatically used at logon)
As a matter of fact it is also not a good solution. because if the user is logged in it shows error that the drive is already connected - that it cannot be connected multiple times or with multiple users. I am confused about the way the windows scheduler works. :( Is it possible to do backup with acceptable functionality??

Recommended Answers

All 4 Replies

I also use Robocopy quite a bit but I am not sure that this is the best tool for what you are trying to accomplish. There is a few advantages that a traditional backup application can give you over robocopy.

1) A backup job will backup the files from source to destination, compress the items and store the backup as one file.
2) you can create a strategy where you only perform a full backup once, then run incrementals between full backups. This will increase the recovery process, but greatly speeds up the backup process especially if only a few of the source files are being modified daily.

So, there is no wrong or right way to do this. The tool that you choose should depend on your exact needs. AGain, I use robocopy to create "backups" as well, typically I use it when I need to create a mirror instead of a backup (robocopy c:\ d:\ /mir).

with regard to your net use command, it should work, but your syntax is off. Should be..

net use z:\linux\backup /user:remoteuser. Just type net use ? for help on that command.

Robocopy is just 1 tool in the toolbox. It's great to keep a mirrored/secondary copy of data, but no good way to do historicals....

And the correct Net use syntax is

NET USE Z: \Servername\sharename /USER:username

If you are aware of rsync on the Linux box, you will find it to be an excellent tool to sync directory structures from one Linux box to another..

Unison is a freeware extension of rsync that runs on both Windows and Linux platforms. It's MUCH more efficient than Robocopy in these situations and not too difficult to set up and run from a scheduler.

In one client environment, they used Robocopy to sync a master web server to 3 slaves. The process ran every 4 hours and took nearly 90 minutes to complete. We switched them to Unison and the process time dropped to 15-20 minutes (5-7 minutes per host-pair) depending on the number of updates. The difference is that Unison runs on both systems, not just one. Each system creates a list of files and checksums and exchanges that list with the peer server(s). The lists are compared and each server replicates the changes to the other. By default, Unison is a bi-directional version of rsync, but you can force one-way replication. Because of this peer arrangement, Unison is especially suited for replication between sites over WAN links, something I'd never consider Robocopy for.

Google "Unison File Synchronizer" for more info.


NET USE Z: \Servername\sharename /USER:username

The correct syntax is with two leading back slashes as in

NET USE Z: \\Servername\sharename /USER:username
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.