From 9f38ecac1e19219e185ad7e7aa2a8ce83cf9507f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Sep 2021 12:10:14 -0400 Subject: [PATCH] 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 --- CHANGELOG | 7 +++++++ Remote/Borg.hs | 9 +++++++++ .../comment_1_703c9a9be1e0b0ca9ce4dd0309546a04._comment | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 doc/forum/Borg_and_xattrs/comment_1_703c9a9be1e0b0ca9ce4dd0309546a04._comment diff --git a/CHANGELOG b/CHANGELOG index 73d0cde3a9..538ae62a49 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +git-annex (8.20210904) UNRELEASED; urgency=medium + + * borg: Avoid trying to extract xattrs, ACLS, and bsdflags when + retrieving from a borg repository. + + -- Joey Hess Fri, 03 Sep 2021 12:02:55 -0400 + git-annex (8.20210903) upstream; urgency=medium * Deal with clock skew, both forwards and backwards, when logging diff --git a/Remote/Borg.hs b/Remote/Borg.hs index 3cf4888448..86db4bf21c 100644 --- a/Remote/Borg.hs +++ b/Remote/Borg.hs @@ -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) ] diff --git a/doc/forum/Borg_and_xattrs/comment_1_703c9a9be1e0b0ca9ce4dd0309546a04._comment b/doc/forum/Borg_and_xattrs/comment_1_703c9a9be1e0b0ca9ce4dd0309546a04._comment new file mode 100644 index 0000000000..305659540f --- /dev/null +++ b/doc/forum/Borg_and_xattrs/comment_1_703c9a9be1e0b0ca9ce4dd0309546a04._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2021-09-03T16:07:53Z" + content=""" +I see no reason for it to need to preserve xattrs or ACLs. +I've changed it to disable extracting those. +"""]] -- 2.30.2