Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAQ/doc updates: Provide info that deleted files are not handled on extract/restore #4598

Closed
eharris opened this issue May 30, 2019 · 2 comments
Assignees
Milestone

Comments

@eharris
Copy link

eharris commented May 30, 2019

This is primarily a request for FAQ and documentation updates.

The FAQ should make it clear (probably under both the Which file types, attributes, etc. are not preserved? section, and Are there other known limitations?) that deleted files (files which did not exist in the backup being restored) are not removed if they exist in the extract destination. So a restore/extract is not currently able to perform an exact "point-in-time" restore, UNLESS the destination location did not previously exist, which also requires enough spare disk space to hold an additional copy of the entire backup, and takes forever for large backups. (See #963, #1828, #1986, #2872)

A workaround for this missing functionality, which should probably be added as an additional FAQ item is:

  1. Use borg create to create a new (temporary) archive of the current on-disk state
  2. Use borg diff to compare the past archive with the one created in step 1
  3. Parse the output from step 2 and delete any files that are listed as removed
  4. Use borg extract to restore the rest of the backup
  5. Use borg delete to remove the temporary archive created in step 1

A good comment about why this functionality isn't present yet is here: #1986 (comment)

@eharris
Copy link
Author

eharris commented May 30, 2019

This also helps explain (to unfamiliar users) why there is no borg restore verb. It really is just extracting the files contained in the archive, not restoring a prior state.

@ThomasWaldmann ThomasWaldmann added this to the 1.1.11 milestone May 31, 2019
@ThomasWaldmann
Copy link
Member

To make it even more clear:

  • it is restoring to a prior state if you start from an empty directory.
  • it is not transforming a directory with some arbitrary content to a prior state though.

@ThomasWaldmann ThomasWaldmann self-assigned this Jun 10, 2019
ThomasWaldmann added a commit that referenced this issue Jun 10, 2019
…ion-master

extract: document limitation "needs empty destination", fixes #4598
@ghost ghost mentioned this issue Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants