Showing posts with label cleanup. Show all posts
Showing posts with label cleanup. Show all posts

Wednesday, March 7, 2012

Maintenance Plans Cleanup Task does not delete files

Hello,

I've created a Maintenance Plan with a Backup Task and a Cleanup Task. The Backup task works fine, but not the cleanup task.

When I execute the maintenant plan, there's none error message but the old backup files aren't deleted.

Could you help me please?

Thanks

I was a bit puzzled by this as well, but then i read the help file:

Backup and restore history

Retaining records of when recent backups were created can help SQL Server create a recovery plan when you want to restore a database. The retention period should be at least the frequency of full database back ups.

SQL Server Agent Job history

This history can help you troubleshoot failed jobs, or determine why database actions occurred.

Maintenance plan history

This history can help you troubleshoot failed maintenance plan jobs, or determine why database actions occurred.

So it actually makes a lot of sence that the back-up itself is not deleted, only the information in the database that says the back-up was made.

|||

You may be running into the below issue.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=336728&SiteID=1

Backup task supports subfolder but cleanup task did not in RTM. This is addressed in SP1.

Let me know if this is not the issue you are running into.

Gops Dwarak

|||

Oops,

Maintenance Clean-up Task != History Clean-up Task

My bad....

Saturday, February 25, 2012

Maintenance Plans and cleaning up backups in subfolders...

The maintenance job I have creates sub-folders for each database when it
backups.
The Cleanup Job is pointing to the root of this folder but it's not deleting
previous backups. It's set to delete files older than 2 days.
Does this not supported by the SQL2K5?
Should I not set it to create folders for each database backup?
Thanks in advance...
Do you know where can I enable this option?
"Tibor Karaszi" wrote:

> With sp1, you have an option to recurse sub-folders. also, there has been lots of work on maint
> plans in sp2.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
>
|||It is in the cleanup task. You have to open it in the maintenance plan
editor and you will see it.
Andrew J. Kelly SQL MVP
"Artunc" <artunc_u2@.hotmail.com> wrote in message
news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...[vbcol=seagreen]
> Do you know where can I enable this option?
> "Tibor Karaszi" wrote:
|||I don't see it in there, I'm running SP1.
Do I need to install SP2 to see it?
"Andrew J. Kelly" wrote:

> It is in the cleanup task. You have to open it in the maintenance plan
> editor and you will see it.
> --
> Andrew J. Kelly SQL MVP
> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...
>
>
|||Never mind, I see it now.
I had to open the Management Studio localy on the SQL Server.
For some reason, I don't see this option when I look at it remotely from my
workstation.
Thanks everyone...
"Artunc" wrote:
[vbcol=seagreen]
> I don't see it in there, I'm running SP1.
> Do I need to install SP2 to see it?
> "Andrew J. Kelly" wrote:

Maintenance Plans and cleaning up backups in subfolders...

The maintenance job I have creates sub-folders for each database when it
backups.
The Cleanup Job is pointing to the root of this folder but it's not deleting
previous backups. It's set to delete files older than 2 days.
Does this not supported by the SQL2K5?
Should I not set it to create folders for each database backup?
Thanks in advance...With sp1, you have an option to recurse sub-folders. also, there has been lots of work on maint
plans in sp2.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Artunc" <artunc_u2@.hotmail.com> wrote in message
news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
> The maintenance job I have creates sub-folders for each database when it
> backups.
> The Cleanup Job is pointing to the root of this folder but it's not deleting
> previous backups. It's set to delete files older than 2 days.
> Does this not supported by the SQL2K5?
> Should I not set it to create folders for each database backup?
> Thanks in advance...|||Do you know where can I enable this option?
"Tibor Karaszi" wrote:
> With sp1, you have an option to recurse sub-folders. also, there has been lots of work on maint
> plans in sp2.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
> >
> > The maintenance job I have creates sub-folders for each database when it
> > backups.
> > The Cleanup Job is pointing to the root of this folder but it's not deleting
> > previous backups. It's set to delete files older than 2 days.
> >
> > Does this not supported by the SQL2K5?
> > Should I not set it to create folders for each database backup?
> >
> > Thanks in advance...
>|||It is in the cleanup task. You have to open it in the maintenance plan
editor and you will see it.
--
Andrew J. Kelly SQL MVP
"Artunc" <artunc_u2@.hotmail.com> wrote in message
news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...
> Do you know where can I enable this option?
> "Tibor Karaszi" wrote:
>> With sp1, you have an option to recurse sub-folders. also, there has been
>> lots of work on maint
>> plans in sp2.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Artunc" <artunc_u2@.hotmail.com> wrote in message
>> news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
>> >
>> > The maintenance job I have creates sub-folders for each database when
>> > it
>> > backups.
>> > The Cleanup Job is pointing to the root of this folder but it's not
>> > deleting
>> > previous backups. It's set to delete files older than 2 days.
>> >
>> > Does this not supported by the SQL2K5?
>> > Should I not set it to create folders for each database backup?
>> >
>> > Thanks in advance...
>>|||I don't see it in there, I'm running SP1.
Do I need to install SP2 to see it?
"Andrew J. Kelly" wrote:
> It is in the cleanup task. You have to open it in the maintenance plan
> editor and you will see it.
> --
> Andrew J. Kelly SQL MVP
> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...
> >
> > Do you know where can I enable this option?
> >
> > "Tibor Karaszi" wrote:
> >
> >> With sp1, you have an option to recurse sub-folders. also, there has been
> >> lots of work on maint
> >> plans in sp2.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://sqlblog.com/blogs/tibor_karaszi
> >>
> >>
> >> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> >> news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
> >> >
> >> > The maintenance job I have creates sub-folders for each database when
> >> > it
> >> > backups.
> >> > The Cleanup Job is pointing to the root of this folder but it's not
> >> > deleting
> >> > previous backups. It's set to delete files older than 2 days.
> >> >
> >> > Does this not supported by the SQL2K5?
> >> > Should I not set it to create folders for each database backup?
> >> >
> >> > Thanks in advance...
> >>
> >>
>
>|||Never mind, I see it now.
I had to open the Management Studio localy on the SQL Server.
For some reason, I don't see this option when I look at it remotely from my
workstation.
Thanks everyone...
"Artunc" wrote:
> I don't see it in there, I'm running SP1.
> Do I need to install SP2 to see it?
> "Andrew J. Kelly" wrote:
> > It is in the cleanup task. You have to open it in the maintenance plan
> > editor and you will see it.
> >
> > --
> > Andrew J. Kelly SQL MVP
> >
> > "Artunc" <artunc_u2@.hotmail.com> wrote in message
> > news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...
> > >
> > > Do you know where can I enable this option?
> > >
> > > "Tibor Karaszi" wrote:
> > >
> > >> With sp1, you have an option to recurse sub-folders. also, there has been
> > >> lots of work on maint
> > >> plans in sp2.
> > >>
> > >> --
> > >> Tibor Karaszi, SQL Server MVP
> > >> http://www.karaszi.com/sqlserver/default.asp
> > >> http://sqlblog.com/blogs/tibor_karaszi
> > >>
> > >>
> > >> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> > >> news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
> > >> >
> > >> > The maintenance job I have creates sub-folders for each database when
> > >> > it
> > >> > backups.
> > >> > The Cleanup Job is pointing to the root of this folder but it's not
> > >> > deleting
> > >> > previous backups. It's set to delete files older than 2 days.
> > >> >
> > >> > Does this not supported by the SQL2K5?
> > >> > Should I not set it to create folders for each database backup?
> > >> >
> > >> > Thanks in advance...
> > >>
> > >>
> >
> >
> >

Maintenance Plans and cleaning up backups in subfolders...

The maintenance job I have creates sub-folders for each database when it
backups.
The Cleanup Job is pointing to the root of this folder but it's not deleting
previous backups. It's set to delete files older than 2 days.
Does this not supported by the SQL2K5?
Should I not set it to create folders for each database backup?
Thanks in advance...With sp1, you have an option to recurse sub-folders. also, there has been lo
ts of work on maint
plans in sp2.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Artunc" <artunc_u2@.hotmail.com> wrote in message
news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
> The maintenance job I have creates sub-folders for each database when it
> backups.
> The Cleanup Job is pointing to the root of this folder but it's not deleti
ng
> previous backups. It's set to delete files older than 2 days.
> Does this not supported by the SQL2K5?
> Should I not set it to create folders for each database backup?
> Thanks in advance...|||Do you know where can I enable this option?
"Tibor Karaszi" wrote:

> With sp1, you have an option to recurse sub-folders. also, there has been
lots of work on maint
> plans in sp2.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> news:60572E3A-8C37-4236-A7DE-7E16EE73292D@.microsoft.com...
>|||It is in the cleanup task. You have to open it in the maintenance plan
editor and you will see it.
Andrew J. Kelly SQL MVP
"Artunc" <artunc_u2@.hotmail.com> wrote in message
news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...[vbcol=seagreen]
> Do you know where can I enable this option?
> "Tibor Karaszi" wrote:
>|||I don't see it in there, I'm running SP1.
Do I need to install SP2 to see it?
"Andrew J. Kelly" wrote:

> It is in the cleanup task. You have to open it in the maintenance plan
> editor and you will see it.
> --
> Andrew J. Kelly SQL MVP
> "Artunc" <artunc_u2@.hotmail.com> wrote in message
> news:201DF41C-9E0C-44A2-9582-332E33E25A09@.microsoft.com...
>
>|||Never mind, I see it now.
I had to open the Management Studio localy on the SQL Server.
For some reason, I don't see this option when I look at it remotely from my
workstation.
Thanks everyone...
"Artunc" wrote:
[vbcol=seagreen]
> I don't see it in there, I'm running SP1.
> Do I need to install SP2 to see it?
> "Andrew J. Kelly" wrote:
>