Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a SQL Database that is running 15 minute backups to a folder on the local disk. I also have a maintenance task in SQL Server that's automatically deleting any backups that are over 1 hour old. The backup folder is exposed across a network share to a second server on a cross-over cable.

Okay on server number 2 I need a way to sync the folder shared on the database server (i.e. the one containing the rolling 15 min backups) to a local folder. This will completely isolate the files away from server 1 to give me some recovery options should server 1 fail.

Can anyone recommend a light weight folder syncing application to run on server 2 so that I can mirror the contents of the network folder to a local folder? Kind of like Dropbox but between a local folder and a network share.

So far I've tied myself in knots writing a DOS command file to copy across the new files and delete the old ones. I've tried to hook it up to a Task Scheduler but am running into endless permission problems. The actual command file runs perfectly when manually invoked, but automating it is proving difficult.

UPDATE ---------------

I have now solved this problem by backing up directly to the network share. I was having trouble with this previously due to the the Network Service account not recognising the share address. In the end I solved it using the method here: http://www.howtogeek.com/51788/how-to-backup-sql-databases-to-a-network-share/

share|improve this question
    
Why not configure the backup to backup to a shared folder on server 2 and eliminate the middle man altogether? –  joeqwerty Jul 22 '13 at 15:24
    
That's exactly what I've now done. I had some permissions issues at first but all I needed to do was to change the windows service to use the Administrator account and the backups got created without a problem. –  QF_Developer Jul 22 '13 at 16:47

1 Answer 1

up vote 3 down vote accepted

The simplest, lightest-weight method would probably to use robocopy with a scheduled task. Permissions should be relatively straightforward as long as you give RC the right credentials and make sure the user has both NTFS and fileshare-level access to the folder.

If you're running Active Directory, a DFS Replication Group would be also quite easy to configure.

There are various third-party solutions as well, but either of the above is simple to set up as well as lightweight.

Finally, you could just backup to a share on the secondary server itself, rather than adding a replication technology.

If you're having trouble with your current scheduled task, it may be because cmd.exe does not have "run as batch job" permissions by default.

share|improve this answer
    
I'll checkout RC. Some other tools I checked looked great but only work if the application is running. Writing the backups directly to a network also proved to be somewhat problematic as the SQL agent couldn't see the network folder. I've heard RC mentioned elsewhere so will check this out first...thanks! –  QF_Developer Jul 22 '13 at 15:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.