How to delete a bad BackInTime backup (of a failed/unavailable installation)?
- Anmelden oder Registrieren um Kommentare zu schreiben
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!
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
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!
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.
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?
You are welcome.
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?
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!
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.
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
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)?
> 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...!"
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!
https://youtu.be/aS41lwqZEmo?t=1921
this about Caja
A video! GREAT!
I'll watch it now!
I never saw Caja like that :)... I use Caja for local files only, so never experienced the goodies as she was showing in the video, but that is because I saw windose network listed and found no way to disable it. There was no kill-switch for remote services either, so I took all off in the options, and never checked again.
My aim is to keep my computer as a local machine, free from SillyCon Valley and remote connections, with no networking of any kind.
This has been quite a challenge and I do realise I might be missing a lot of good stuff, but the main aim is getting closer and I love my setup at the moment, so have to learn and think carefully.
hmmm, you use networking to connect to internet, Windows network is network of your provider or something, use firewall Gufw it is enough to protect computer. file managers mc and ranger you may like.
about networking http://tcpipguide.com/free/t_NetworkingFundamentals.htm
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).
printf "${var#* }"
printf "${var#*[[:space:]]}"
i think
Same problem as with cut:
$ var=a; printf "${var#* }"
a
I want a blank line in that situation.
hmmm maybe
var=a; set $var; shift; echo "$@"
func() { shift; echo "$@"; }
func $var
It does not work if $var starts with a space:
$ var=' a b'; set $var; shift; echo "$@"
b
I want 'a b' in that situation. Also, that is quite complicated.
If, like me, you actually like spending your holidays doing shell scripting, the "real-life issue" is the implementation of the "invalid" function at the beginning of https://dcc.ufmg.br/~lcerf/utilities/seq-phragmen
That function processes a ballot the user inputs. As a consequence, it can be *anything* (it may start with a space for instance). It is in the sequence variable. It should be a sequence of distinct numbers between 1 and $n (included), otherwise an error is printed. An empty sequence is OK. If the sequence is not empty, the function separates the numbers with single spaces (the user may use other separators) and adds a line to a file in the $TMP/groups/ directory. The name of that file is the first number in the sequence. The line is rest of the sequence. The top of the page 23 of https://arxiv.org/pdf/1611.08826 explains why I want that:
the ballots are organized in groups; the ballots in each group have the same top candidate
"invalid" is actually the function that takes most of seq-phragmen's execution time, if it runs non-interactively. So, beside elegance, it would be nice to make it faster.
ohhh this is difficult, my brain hurts
It was just for the fun. I already have that "invalid" function. You might want to take a look at it if you thought of a possible solution. It is at the top of https://dcc.ufmg.br/~lcerf/utilities/seq-phragmen (nothing crazy but the ugly addition of the space I mentioned and a small Awk program where RS is " ").
thank you, Magic Banana, for this link https://homepages.dcc.ufmg.br/~lcerf/en/utilities.html
I am studying your scripts - it will improve my scripting skills. a lot of great scripting techniques you have
Thank you.
You changed the subject... or is it me, missing something special?
By the way, I managed to move that failed backintime profile/folder to another directory on the external drive, without having to use any terminal command. Not sure what changed, but it was surprisingly easy, unlike the last time I tried.
More Greek :)
Magic Banana, even though you are in Brazil, what you wrote sounds like Greek to me :)
ls /media/$USER/
to find where drive is mounted
if it /media/$USER/mountpoint
if [ -d /media/$USER/mountpoint ]; then mv /backintime/backintime /media/$USER/mountpoint/;fi
i think
Thank you grosbidepoilu!
I'm feeling more confident already! Will be looking for that directory with a comb, that is for sure!
This forum is bliss, to have and hold!