How to delete a bad BackInTime backup (of a failed/unavailable installation)?

14 respuestas [Último envío]
Sunny Day
Desconectado/a
se unió: 01/05/2023

Can someone please enlighten me on the best way to remove a BackInTime profile and its backback? The backup is not only bad, it is also big.

The profile in question was placed (by BackInTime) inside the main profile's directory, i.e, BackInTime profile 2, inside BackIntime profile 1 (profile 1 being a good one, which I must keep safe).

Should I remove the bad profile and backup using BackInTime? If so, how do I access the profile of a failed installation, (which is now gone!)?

With huge pre-thanks for any help!

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

Just select the profile in Settings and press Remove. Keep in mind that you can not remove Main Profile.
https://github.com/bit-team/backintime/issues/904#issuecomment-402278589

Sunny Day
Desconectado/a
se unió: 01/05/2023

I tried that Magic Banana, but have no access to the settings of that sub-directory.

It seems BackInTime has separated the profiles, and made each one relative to its own installation of Trisquel.

EDIT:
-------
This is how the backup folder looks:
/backintime/backintime/

I can access the main backintime directory (the good one), but not the inner one (created by mistake).

I hope BackInTime was not corrupted!

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

I can access the main backintime directory (the good one), but not the inner one (created by mistake).

If, in Back In Time, no profile corresponds to the inner directory, I guess you can simply remove it from the disk.

I hope BackInTime was not corrupted!

If Back In Time reports no error when it makes a new snapshot, I believe you are fine. Anyway, instead of removing the inner directory, as I just wrote, you may first move it or rename it and then test your backup, restoring some old file.

Sunny Day
Desconectado/a
se unió: 01/05/2023

That sounds wise, thank you Magic Banana! Once again!!

I would be moving and/or removing that inner backintime directory from an external drive. Could I bug you for instructions, so I don't make another mistake?

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

You are welcome.

Sunny Day
Desconectado/a
se unió: 01/05/2023

Magic Banana, sorry for being a pest, but I have one more question, if that is OK.

I am unsure of which commands to use to 'find' and 'move' a directory located on an external drive.

Could you please let me know?

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

First of all: you are not a pest. As you have probably already noticed, I love to help people here (and I have been in holidays at home, but that comes to an end next week).

mv moves or rename a file (directory included). Automatic mounts usually happen in /media/$USER (hence, probably no need for 'find'). But you can do that with your favorite file manager too!

Sunny Day
Desconectado/a
se unió: 01/05/2023

Thank you for being there Magic Banana!

mv moves or rename a file (directory included)

So, how do I know if I'm moving or renaming the directory? Are there different ways to use the "mv" command? And how should I write each of those commands (to rename + to move)?

NOTE:
Hope you having a refreshing holiday! Please don't worry, and take your time, I'm not in a hurry.

Avron

I am a translator!

Desconectado/a
se unió: 08/18/2020

how do I know if I'm moving or renaming the directory?

mv a b

If b is an existing directory, this is moving a (directory or file) to b, otherwise this is renaming a to b.

Note that, if there was already a file a in b (if b is a directory) or a file b in the current directory, such a file is also deleted. If you don't want that, you can use

mv -n a b

If you write commands yourself, there are things to know about how bash splits a command into words (spaces and tabs are considered as separators) and how the words are interpreted. In particular, there are special things to do if your filenames include whitespace characters or start with -.

Especially for mv, it may be wise to use a test directory and create files and directories in it, in order to test your command on them first.

It is a little complex but there is a nice guide at https://mywiki.wooledge.org/BashGuide/CommandsAndArguments

Sunny Day
Desconectado/a
se unió: 01/05/2023

That was very helpful, Avron - thank you for the detailed info and link to the guide (I'll go back to read it)!

I'll also follow your advice on testing + will add it here, to remind myself and avoid any more mistakes:

Especially for mv, it may be wise to use a test directory and create files and directories in it, in order to test your command on them first.

Will try to make a habit of it!

EDIT:
I want to move+rename the bad directory (with bad profile) to a folder outside BackInTime, a kind of neutral zone, so if all goes well, I can delete that failed thing... do you think this could create problems for the existing BackInTime backups (the good ones)?

prospero
Desconectado/a
se unió: 05/20/2022

> Please don't worry

As you can see, we are all a bit worried now, except Magic Banana, who is scuba diving in the Maldives for a short couple of months. Is there a specific reason why you cannot use Caja to access that external drive, right click on the folder you want to rename, and select "Rename" in the context menu thereby summoned?

As our record-breaking holidaymaker famously suggested in his very last words before diving: "But you can do that with your favorite file manager tooooo...!"

Magic_bananas_travel_to_the_Maldives_for_relaxation_and_diving.jpg
Sunny Day
Desconectado/a
se unió: 01/05/2023

Interesting suggestion, Prospero!

I never used Caja for sophisticated things like that - remember, I am a lowly user who escaped SillyCon Valley into a world of puzzling black windows!

I have to get acquainted with the perks, so I can have a favourite file manager in the sunshine too! Where could I go to learn more about it, I mean, learn as regular users (without coding skills) might go to learn.

Just imagining Magic Banana emerged in blue waters, under the real sunshine.. you painted that picture in my head, now it's there!

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

I am at home, as I wrote. That is Belo Horizonte, Brazil. No sea here, but I have been contemplating some shell anyway. Some POSIX shell. Indeed, I discovered Phragmén's ordered method (it is great if you want to aggregate rankings and not only get one single winner), found no implementation of it, and decided to make my own. Here it is: https://dcc.ufmg.br/~lcerf/en/utilities.html#seq-phragmen

The most difficult part was not the method itself but the spacing issues Avron mentioned in this thread. For instance, given a line in a Shell variable, how do you get everything after the first space or a blank line (which is *not* nothing) if there is no space? The simplest way I found requires adding a space before and asking cut to output the third field onward:
$ printf " $var" | cut -d ' ' -f 3-
It is ugly, but printf "$var" | cut -d ' ' -f 2- does not work if var has no space (cut outputs everything) and adding option -s does not help (cut outputs nothing, in the same situation).

Sunny Day
Desconectado/a
se unió: 01/05/2023

Magic Banana, even though you are in Brazil, what you wrote sounds like Greek to me :)