COPYTO Fails to DFS Namespace
MattS
Posts: 25
We currently have backups running and successfully copying to a network share. We want to move the network share to a new DFS namespace, but SQL backup does not seem to recognise the new share.
I have tried amending via the GUI, but when I change the network copy location to the new DFS location it returns an error message saying the folder does not exist.
I have tried running a backup via SSMS using master..sqlbackup and setting the COPYTO setting to the new DFS location. This generates numerous COPYTO errors, including "COPYTO error: Failed to create folder...".
My initial thoughts were that this is obviously permissions related. However, I have spun up a test SQL install and configured the cmdshell proxy account as the same domain account that the SQL Backup service is running under. On the test install I am able to use xp_cmdshell to write to the DFS location, thereby proving that the service account does have the correct permissions.
Does SQL Backup work correctly with DFS Namespaces? Can anybody help identify the problem?
Thanks in advance for any assistance!
I have tried amending via the GUI, but when I change the network copy location to the new DFS location it returns an error message saying the folder does not exist.
I have tried running a backup via SSMS using master..sqlbackup and setting the COPYTO setting to the new DFS location. This generates numerous COPYTO errors, including "COPYTO error: Failed to create folder...".
My initial thoughts were that this is obviously permissions related. However, I have spun up a test SQL install and configured the cmdshell proxy account as the same domain account that the SQL Backup service is running under. On the test install I am able to use xp_cmdshell to write to the DFS location, thereby proving that the service account does have the correct permissions.
Does SQL Backup work correctly with DFS Namespaces? Can anybody help identify the problem?
Thanks in advance for any assistance!
Comments
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
That backs up successfully.
To confirm, the test install was running under the local system account and attempting to backup to the new location failed. Changed the SQL Server service to run under the same domain account that the SQL Backup Agent Service runs under, and the backup succeeds.
Thanks for your help.
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
This function simulates creating a file and deleting it on the network share, and reports if sufficient rights exist to perform the tasks.
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Thanks for your help.
If you use SQL Backup to create a backup file to another network share successfully, is the owner/creator of the file the same user account as the SQL Backup Agent service startup account?
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Simply restarting the SQL Backup Agent service seems to have done the trick.
One of the factors behind the move from the current network share to the new DFS namespace is the new DR solution we are implementing. Part of this solution includes log shipping, which we are using SQL Backup for.
Before approaching the network guys about granting 'EVERYONE' permissions on the new share, I tried the same tests we did before (backup msdb to the DFS namespace/EXEC sqbutility) on the DR server and they worked. The SQL Backup service on the DR server is running under the same domain account as the server we've had the issues with, so this again confirmed it was not a permissions issue. As a final test I thought it may be worth restarting the SQL Backup service, and hey presto everything is working now :-)
Thanks for your assistance Pete. Greatly appreciated.