borg: Avoid trying to extract xattrs, ACLS, and bsdflags

when retrieving from a borg repository

That broke restoring on linux from a borg backup made on OSX.

Sponsored-by: Boyd Stephen Smith Jr. on Patreon
This commit is contained in:
Joey Hess 2021-09-03 12:10:14 -04:00
parent 1877da2c3e
commit 9f38ecac1e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 24 additions and 0 deletions

View file

@ -360,6 +360,15 @@ retrieveExportWithContentIdentifierM borgrepo loc _ dest mkk _ = do
absborgrepo <- absBorgRepo borgrepo
let p = proc "borg" $ toCommand
[ Param "extract"
-- git-annex object files do not need any
-- xattrs or ACLs, and trying to extract
-- any that are set from the backup can lead
-- to problems when doing a retrieve from a
-- different OS than the one where the backup was
-- made.
, Param "--noxattrs"
, Param "--noacls"
, Param "--nobsdflags"
, Param (borgArchive absborgrepo archivename)
, File (fromRawFilePath archivefile)
]