I have been playing around with Windows 2008R2's built-in robocopy command line tool to handle by "file sync" from local machine onto a remote machine.
It all works fine, but I am confused as to how I would get a few other things to work..
Below is the command I am using:
robocopy "E:\SQL Backups\VAN-SQL02" "\\VAN-BACKUP\Automated Backup\VAN-SQL02" /E /COPY:DAT /DCOPY:T /MIR /V /NP /LOG:"E:\SQL Backups\BackupSync.log" /NDL /NC /TS /B /R:3 /W:60 /MT:3
I added the /NDL switch for No Directory List, but it still shows up in the log?
Also, is there a way to rotate the log file? Anyone have this working? I don't want to appent; but rather overwrite each time the back-up runs.. however I would like to preserve a set amount of logs (7 days or so).
This is used to move the local SQL backups (database and transaction logs), to a remote server which then is copied to tape.
One thing I would also like to experiment with is having the script run on a Windows Task Scheduler every 15 minutes, and sync any new changes to the source directory (which would be transactions that are backed up every 20 minutes by a stored procedure, and back-ups once a night).
Having the Scheduling Manager run on a 15 minute timer ensures me that the transaction logs are being moved off the server continuously and also the nightly back-ups.
Which robocopy option is best for that? /MOT:20 or ?
Finally, should would it be better to schedule two jobs and making use of /XF to exclude databases in one, and transactions in the other; so that they are discreet (transaction sync and backup sync).
Thanks for your help in this matter.