[Borgbackup] extract restores deleted files

Thomas Waldmann tw at waldmann-edv.de
Sun Oct 6 09:19:54 EDT 2019


> I had backups for a few weeks. I got a new m.2 card and made a new
> backup right then. Then, I unplugged my old m.2 card and plugged in the
> new one. I put a base system on it and installed borg. I did a borg
> extract of the backup I had just made.
> 
>  
> 
> Files that I had deleted days ago showed back up on my computer. Files I
> had moved to other locations showed up in their original locations. But,
> new files I had added since the backup before last also showed up.
> 
> Any idea what went wrong? I typed the command to extract the archive I
> had just made.

No idea, but without the specific and complete sequence of commands,
that is hard to say.

In general, borg does always do a full backup of whatever you give it
(especially, there is no full / differential operation like with
traditional backup tools).

So if you backup the directory /m2 (as root user), the archive will
contain all files below /m2 - no more, no less.

It is impossible that the archive contains files that were not present
any more / were not present yet below /m2 at the time of archive
creation. They are not there, so how should they get into the archive?

The contents of other archives that you made previously or later is not
relevant when extracting one specific archive, the extracted files will
exactly be the ones contained in the archive you are extracting.


So what I suspect is that what you intended to do was not really what
you have done.


Ideas about what could have gone wrong (just guessing):

- wildcards going wild - the shell will expand wildcards like * if you
did not use quotes appropriately

- maybe the mountpoint of your old m.2 card was not empty and contained
an old state of the stuff also contained on the m.2 filesystem? maybe
you did not mount the new m.2 filesystem before restoring the borg
archive into the not-empty mountpoint directory?

- maybe you did multiple extraction attempts without starting fresh from
an empty directory?

borg does not support transforming a non-empty extraction target
directory into a specific state, you will get a mix up of whatever you
extracted.

- maybe you use multiple repositories / multiple backup media and
confused them? or archive names?


Hope that helps.

If you still think there is some malfunction in borg, please try to
reproduce it, write a script with all steps needed to reproduce and file
a bug in the issue tracker with the script.


-- 

GPG ID: 9F88FB52FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393


More information about the Borgbackup mailing list