backintime icon indicating copy to clipboard operation
backintime copied to clipboard

Make all profiles removable including the "main profile"

Open jwbrase opened this issue 3 years ago • 5 comments

Blocked-by:

  • #1495

I recently moved my backups from a locally attached external drive to a TrueNAS box on the LAN. I ran both for a while, and once I was sure that the remote backups were working, I removed the external drive. Unfortunately, it seems that BackInTime does not allow the first profile created to be removed (I guess to prevent people from removing all of their profiles by accident?). I've disabled it, and set the backup directory to a dummy directory (otherwise any time I try to change the new profile, the "main" profile generates an error dialog about a missing backup directory and doesn't allow the profile settings dialog to be closed), but I'd like to be able to get rid of it completely.

jwbrase avatar Nov 22 '22 05:11 jwbrase

Dear Jon, thank you for your report.

This is a known shortcoming of BIT that the "main profile" is undeletable. And I'm not aware of a good workaround for that.

What do you mean by "disabled" the profile? IMHO there shouldn't be an error message when you

  • set the profile to "Local"
  • deactivate the time scheduling
  • and give it an existing folder

Did you tried that?

Maybe related to #1032

buhtz avatar Nov 22 '22 07:11 buhtz

"Disabled" means I turned off scheduling. I've already set the backup directory to an existing directory that's excluded from the backup scope. The main profile isn't doing anything at the moment and I've resolved the issue with not having an existing backup folder. Mostly at this point I guess I'm just asking for a workaround and making a feature request for some better way of handling this.

As for the workaround, you say there's no good workaround; Could one in principle hand edit config files or something to change what's considered the "main" profile? If not, I guess I'll keep the profile around, but it would be nice to be able to clean it up.

As for ways that BIT could handle this better, I guess it depends on exactly why the main profile is unremovable. If it's a safety feature to prevent the user from doing stupid things, it doesn't prevent the user's most important profile from being removed if their most important is not their first, so I'm not sure it actually makes things all that much safer. If the application needs at least one profile to exist at all times for some reason, maybe have some way of designating a new main profile?

jwbrase avatar Nov 22 '22 07:11 jwbrase

I agree with you. The current situation is not a good solution and there is IMHO no good reason to keep the main profile.

We will keep this as a feature request. But as far as I can see this won't get fixed in the near future because of Issues with higher priority.

My suggestions for fix would be

  • BIT should allow to delete each profile including the last one.
  • Starting BIT again it should act like it does when starting the first time: Forcing to setup a profile.
  • By default BIT should select the last opened profile in the list.
    • This will make problems (error messages) when there is a SSH profile with unavailable remote.
    • When this happen while opening BIT should give the error message dialog but also improve it with a list of all other available profiles that can be opened as an alternative.

buhtz avatar Nov 22 '22 07:11 buhtz

Could one in principle hand edit config files or something to change what's considered the "main" profile?

Yes, make a backup of the config file ~/.config/backintime/config then edit it and remove all lines starting with "profile1.".

After that take the highest "profile" number from the config file and do a global replace of eg. profile5. with profile1..

This effectively makes profile 5 to profile 1...

aryoda avatar Nov 22 '22 08:11 aryoda

And let me add: I would also be able to rename the default profile ("main profile" is not very helpful)

aryoda avatar Nov 22 '22 10:11 aryoda