Scheduled backup tasks with identical names allowed to create
Description
How to test
1. Check that it's impossible to create a scheduled task with existing Name.
2. Check that it's impossible to rename a task to existing Name.
3. Check after updating from 2.33 all identical Names of scheduled tasks are changed by template:
XXX-pmm-renamed-<random UUID>
where XXX - old task name, <random UUID> - randomly generated UUID
Rules are being implemented to all tasks across all types of databases.
Since we're renaming the tasks the further artifacts and artifact names will be renamed too. But the old ones won't. So we should check that all old artifacts are workable and can be used to restore databases, including PITR artifacts.
How to document
Smart Checklist
hideActivity

Catalina Adam January 19, 2023 at 12:45 PMEdited
Added the following note in the Rel Notes:
_ (https://jira.percona.com/browse/PMM-11069) - [Backup]: PMM no longer allows creating backup tasks with a name that already exists. After upgrading to PMM 2.34, any backup tasks with duplicate names are automatically renamed to apply the new naming conventions._

Vojtech Koval December 8, 2022 at 4:52 PMEdited
To finish the testing, I need this FB to be merged into the experimental repo so that I can verify Upgrade scenarios. I've asked to do it, and I am awaiting his actions.

Pavel Khripkov November 22, 2022 at 4:31 PM
In the new implementation we rename all the duplicated tasks to some random names. And if user has a PITR task which is renamed, new PITR "artifact" will be created in All Backups page and new folder in S3 or Local storage will be created. The old "artifact" still can be used to restore. The question is should we do something with that or just add description of this behaviour in the docs?
It possible to create several scheduled backup tasks with the same name. It leads to:
Since for snapshot tasks we create new name for every snapshot, the only problem user cannot distinguish them.
For PITR backups several scheduled tasks are not allowed. In the same time user can create one task, use it for some time, then pause it. After that user creates another task with the same name (and same Location), and we're storing artifacts in the same folder. This leads to overlapping and unpredictable consequences.
After fixing the main problem also should be added algorithm for renaming existing tasks in user's db.