Unified Backups: Handle existing data when restoring from a backup

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !164205 (merged) should be addressed:

We have a few options to handle existing data when restoring from a backup.

Copying over from @brodock's comment in the conversation over Slack:

Option 1: Legacy behaviour: if you had something in artifacts we would move that to artifacts.202410181210 upside: it’s simple, we move files around downside: it takes extra disk space

Option 2: if we detect existing data we tell the user they need to clean that before trying to restore (alternatively allowing a scary --delete-existing-data sort of flag)

Options 3: we run a backup before restoring over existing data, if we detect existing data (upside, easy to undo a mistake, downside: can take a lot of time)

As the shortest iteration during decoupling of the cli from the rails codebase, as part of !164205 (merged) we will ignore existing data, log a warning and continue with a restore.

Edited by 🤖 GitLab Bot 🤖