R
R
Renaissance2018-07-24 06:53:25
SQL Server
Renaissance, 2018-07-24 06:53:25

How does the Maintenance Cleanup Task work?

Quite a stupid question, but still:
how does the Maintenance Cleanup task work when there are several active Maintenance Plans that have the same location for backups? Does each Maintenance Cleanup process only its own Maintenance Plan (database copies created within the framework of this particular task) or does it go through absolutely all directories (with the Include first-level subfolders option enabled)?
For example: there are 2 Maintenance Plans, each with its own Maintenance Cleanup Task, one set to clean up after 5 days, and the other to clean up every day. Will ALL daily copies from both plans be deleted, or will the ones that belong to the daily plan be processed and deleted?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Zotov, 2018-08-28
@leftleg

If you simply specify the directory and extension of the file being processed in Maintenance Cleanup, then all files older than the specified retention period will be deleted, regardless of which Maintenance Plan they were created with.
As I understand it, you have a daily scheduled task for a certain set of databases, most likely it includes a backup function before the main service task, and then there is an auto-delete of a database backup older than one day. As a result of the first scheduled task, is there a valid backup before the main scheduled task?
The second scheduled task also runs daily, and most likely also creates a backup copy of the database before executing the main task, but cleans up all database copies older than 5 days?
If I understood correctly the configuration of your tasks, then you can create the necessary backups in separate directories and clear the corresponding directories from your Maintenance Plan.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question