Sunday, March 25, 2012

clean up bak files on file server

I have a maintanence plan that does a backup of all my databases and stores
the databases on a nas device. The problem is that the clean plan I have is
not removing the .bak files that are older then 4 days. How can I get my
Clean up plan be able to delete the .bak files that are 4 days old? This is
only happening with my SQL 2005 servers, my sql 2000 servers are working
correctly.
Mike,
In your SQL Server 2005 maintenance plan, you need to add a Maintenance
Cleanup Task. The expiry date on backups only marks when they can be
overwritten. The cleanup task is what actually deletes files.
RLF
"Mike" <Mike@.Ihatespam.net> wrote in message
news:ul47jBheIHA.4696@.TK2MSFTNGP05.phx.gbl...
>I have a maintanence plan that does a backup of all my databases and stores
>the databases on a nas device. The problem is that the clean plan I have is
>not removing the .bak files that are older then 4 days. How can I get my
>Clean up plan be able to delete the .bak files that are 4 days old? This is
>only happening with my SQL 2005 servers, my sql 2000 servers are working
>correctly.
>
>
|||I have a Clean up History plan, is that the same as 'clean up task'?
If so then that isn't deleting the files from my nas location
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23%23qqdEheIHA.3756@.TK2MSFTNGP06.phx.gbl...
> Mike,
> In your SQL Server 2005 maintenance plan, you need to add a Maintenance
> Cleanup Task. The expiry date on backups only marks when they can be
> overwritten. The cleanup task is what actually deletes files.
> RLF
> "Mike" <Mike@.Ihatespam.net> wrote in message
> news:ul47jBheIHA.4696@.TK2MSFTNGP05.phx.gbl...
>
|||Its called "Maintenance Cleanup Task"
- - - - - - - - -
Thanks
Yogish
"Mike" wrote:

> I have a Clean up History plan, is that the same as 'clean up task'?
> If so then that isn't deleting the files from my nas location
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:%23%23qqdEheIHA.3756@.TK2MSFTNGP06.phx.gbl...
>
>
|||Mike,
No, it is not the same. The Clean up History plan has the following
purpose:
The History Cleanup task deletes historical data about Backup and Restore,
SQL Server Agent, and Maintenance Plan operations. This wizard allows you
to specify the type and age of the data to be deleted.
In case that is not clear (and I can understand why it might not be) it is
not deleting backups, but is deleting the history records that track your
backups, restores, and so forth. It is cleaning up tables in msdb.
RLF
"Mike" <Mike@.Ihatespam.net> wrote in message
news:uS02iPheIHA.5208@.TK2MSFTNGP04.phx.gbl...
>I have a Clean up History plan, is that the same as 'clean up task'?
> If so then that isn't deleting the files from my nas location
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:%23%23qqdEheIHA.3756@.TK2MSFTNGP06.phx.gbl...
>
|||Where can i find the clean up task at?
Sorry for the questions but I'm a developer that is now doing DBA work, so
I'm learning as I go and so far so good, except for a few minor things.
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:uKQV6dheIHA.6092@.TK2MSFTNGP06.phx.gbl...
> Mike,
> No, it is not the same. The Clean up History plan has the following
> purpose:
> The History Cleanup task deletes historical data about Backup and Restore,
> SQL Server Agent, and Maintenance Plan operations. This wizard allows you
> to specify the type and age of the data to be deleted.
> In case that is not clear (and I can understand why it might not be) it is
> not deleting backups, but is deleting the history records that track your
> backups, restores, and so forth. It is cleaning up tables in msdb.
> RLF
> "Mike" <Mike@.Ihatespam.net> wrote in message
> news:uS02iPheIHA.5208@.TK2MSFTNGP04.phx.gbl...
>
|||I found it.
"Mike" <Mike@.Ihatespam.net> wrote in message
news:urmeVgheIHA.536@.TK2MSFTNGP06.phx.gbl...
> Where can i find the clean up task at?
>
> Sorry for the questions but I'm a developer that is now doing DBA work, so
> I'm learning as I go and so far so good, except for a few minor things.
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:uKQV6dheIHA.6092@.TK2MSFTNGP06.phx.gbl...
>
|||I created a clean up task and its still not working. I have all of my .bak
files in sub folders with the db name, and I noticed that the task is only
looking in a root directory with the .bak files, is there a way to have it
search all sub folders within a directory?
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:uKQV6dheIHA.6092@.TK2MSFTNGP06.phx.gbl...
> Mike,
> No, it is not the same. The Clean up History plan has the following
> purpose:
> The History Cleanup task deletes historical data about Backup and Restore,
> SQL Server Agent, and Maintenance Plan operations. This wizard allows you
> to specify the type and age of the data to be deleted.
> In case that is not clear (and I can understand why it might not be) it is
> not deleting backups, but is deleting the history records that track your
> backups, restores, and so forth. It is cleaning up tables in msdb.
> RLF
> "Mike" <Mike@.Ihatespam.net> wrote in message
> news:uS02iPheIHA.5208@.TK2MSFTNGP04.phx.gbl...
>

No comments:

Post a Comment