Backup SQL server db issue: delete old backup files
Posted
by David.Chu.ca
on Server Fault
See other posts from Server Fault
or by David.Chu.ca
Published on 2009-11-17T18:30:28Z
Indexed on
2010/04/22
15:34 UTC
Read the original article
Hit count: 282
sql-server
I tried to use sqlmaint.exe tool to back up a database on a remote PC. Here is an example of backup:
sqlmaint.exe -S remoteSQLServer\SQLInstance -U username -P pwdxxx -D myDB
-BkUpMedia DISK -BkUpDB C:\MSSQL_Backups -DelBkUps 3days ...
Here I specified to delete backups older than 3 days. However, the job seems not deleting old bak files on the remote PC(where the SQL server sits). The remote PC has Windows 2008 Server. I also set the C:\MSQL_Backups as shared network drive for EnyOne as owner. My understanding is that the job will delete any bak files older than 3 days. Not sure what I missed?
By the way, the job runs at a box with SQL server 2005 installed.
© Server Fault or respective owner