Error "Zip archive appears to have a broken Central Record Header, switching to stream mode", restore files wich gpg key

Hi, i test backup and restore my files wich assymetric cryptografik, and i have a problem.
I use linux “Linux ubuntu 4.15.0-55-generic #60~16.04.2-Ubuntu”

  1. Make backup to local folder wich command
cmd for backup

/usr/bin/duplicati-cli backup file:///home/dav/ubuntushare/temp/duplicatyBackup/destinations/backupsFolder/test_backupGPG3/ /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1 --encryption-module=gpg --gpg-encryption-command=–encrypt “–gpg-encryption-switches=–recipient 0xDE99532EC5DF7940” --gpg-decryption-command=–decrypt --passphrase=unused --backup-name=test_backupGPG3 --debug-output=true --log-file-log-level=Verbose --log-file=/home/dav/ubuntushare/temp/duplicatyBackup/destinations/logsFolder/test_backupGPG3.txt

and all right, no error, no warning.
2. But if i make restor wich command

cmd for restore

/usr/bin/duplicati-cli restore file:///home/dav/ubuntushare/temp/duplicatyBackup/destinations/backupsFolder/test_backupGPG3/ --restore-path=/home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/ --encryption-module=gpg --gpg-encryption-command=–encrypt “–gpg-encryption-switches=–recipient 0xDE99532EC5DF7940” --gpg-decryption-command=–decrypt --passphrase=unused --backup-name=test_backupGPG3 --debug-output=true --log-file-log-level=Verbose --log-file=/home/dav/ubuntushare/temp/duplicatyBackup/destinations/logsFolder/test_backupGPG3.txt

i get an error “Zip archive appears to have a broken Central Record Header, switching to stream mode”
if i make repair i haven’t any error.

log file

2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: Началась операция Backup
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingSourcePath]: Including source path: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/AA_v3.log
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/FormatTable.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/dc_motor.ino
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/printTextFileToConky.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/start_backup.py
2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (3 байт)
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingSourcePath]: Including source path: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/AA_v3.log
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.FileEntry-AddDirectory]: Adding directory /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/FormatTable.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/dc_motor.ino
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FilePreFilterProcess.FileEntry-SkipCheckNoMetadataChange]: Skipped checking file, because no metadata was updated /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/AA_v3.log
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FilePreFilterProcess.FileEntry-SkipCheckNoMetadataChange]: Skipped checking file, because no metadata was updated /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/FormatTable.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/printTextFileToConky.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-IncludingPath]: Including path as no filters matched: /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/start_backup.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FilePreFilterProcess.FileEntry-SkipCheckNoMetadataChange]: Skipped checking file, because no metadata was updated /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/dc_motor.ino
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FilePreFilterProcess.FileEntry-SkipCheckNoMetadataChange]: Skipped checking file, because no metadata was updated /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/printTextFileToConky.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.FilePreFilterProcess.FileEntry-SkipCheckNoMetadataChange]: Skipped checking file, because no metadata was updated /home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/start_backup.py
2019-08-11 09:39:58 +07 - [Verbose-Duplicati.Library.Main.Operation.Backup.UploadRealFilelist-RemovingLeftoverTempFile]: removing temp files, as no data needs to be uploaded
2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (3 байт)
2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-20190811T023322Z.dlist.zip.gpg (1,31 КБ)
2019-08-11 09:39:58 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-20190811T023322Z.dlist.zip.gpg (1,31 КБ)
2019-08-11 09:39:59 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-ibb97b1404cc04e7cbff3bbdd30202c70.dindex.zip.gpg (1,37 КБ)
2019-08-11 09:39:59 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-ibb97b1404cc04e7cbff3bbdd30202c70.dindex.zip.gpg (1,37 КБ)
2019-08-11 09:39:59 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-b05044512a84a44a19713006a9f475fd9.dblock.zip.gpg (17,85 КБ)
2019-08-11 09:39:59 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-b05044512a84a44a19713006a9f475fd9.dblock.zip.gpg (17,85 КБ)
2019-08-11 09:40:02 +07 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: Началась операция Restore
2019-08-11 09:40:02 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2019-08-11 09:40:02 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (3 байт)
2019-08-11 09:40:02 +07 - [Information-Duplicati.Library.Main.Database.LocalRestoreDatabase-SearchingBackup]: Searching backup 0 (11.08.2019 2:33:22) …
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Database.LocalRestoreDatabase-RestoreTargetFileCount]: Needs to restore 5 files (189,88 КБ)
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-MappingRestorePath]: Mapping restore path prefix to “/home/dav/ubuntushare/temp/duplicatyBackup/source/backup1/” to “/home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/”
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Database.LocalRestoreDatabase-RestoreSourceSize]: Restore list contains 12 blocks with a total size of 191,01 КБ
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetExistsInCorrectVersion]: Target file exists and is correct version: /home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/AA_v3.log
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetExistsInCorrectVersion]: Target file exists and is correct version: /home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/FormatTable.py
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetExistsInCorrectVersion]: Target file exists and is correct version: /home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/dc_motor.ino
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetExistsInCorrectVersion]: Target file exists and is correct version: /home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/printTextFileToConky.py
2019-08-11 09:40:02 +07 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetExistsInCorrectVersion]: Target file exists and is correct version: /home/dav/ubuntushare/temp/duplicatyBackup/destinations/RestoreFolders/start_backup.py
2019-08-11 09:40:02 +07 - [Information-Duplicati.Library.Main.Operation.RestoreHandler-RemoteFileCount]: 1 remote files are required to restore
2019-08-11 09:40:02 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-b05044512a84a44a19713006a9f475fd9.dblock.zip.gpg (17,85 КБ)
2019-08-11 09:40:03 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-b05044512a84a44a19713006a9f475fd9.dblock.zip.gpg (17,85 КБ)
2019-08-11 09:40:03 +07 - [Warning-Duplicati.Library.Compression.FileArchiveZip-BrokenCentralHeaderFallback]: Zip archive appears to have a broken Central Record Header, switching to stream mode
System.InvalidOperationException: Cannot determine compressed stream type. Supported Archive Formats: Zip, GZip, Tar, Rar, 7Zip, LZip
at SharpCompress.Archives.ArchiveFactory.Open (System.IO.Stream stream, SharpCompress.Readers.ReaderOptions readerOptions) <0x41b824e0 + 0x001fb> in :0
at Duplicati.Library.Compression.FileArchiveZip.get_Archive () <0x41b82440 + 0x00037> in :0
at Duplicati.Library.Compression.FileArchiveZip.LoadEntryTable () <0x41b81ab0 + 0x000cb> in :0
2019-08-11 09:40:03 +07 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-PatchingFailed]: Failed to patch with remote file: “duplicati-b05044512a84a44a19713006a9f475fd9.dblock.zip.gpg”, message: Object reference not set to an instance of an object
System.NullReferenceException: Object reference not set to an instance of an object
at SharpCompress.Readers.AbstractReader2[TEntry,TVolume].get_Entry () <0x41b86a70 + 0x0002b> in <filename unknown>:0 at SharpCompress.Readers.AbstractReader2[TEntry,TVolume].LoadStreamForReading (System.IO.Stream stream) <0x41b86860 + 0x0011f> in :0
at SharpCompress.Readers.AbstractReader`2[TEntry,TVolume].MoveToNextEntry () <0x41b865c0 + 0x0005b> in :0
at Duplicati.Library.Compression.FileArchiveZip.LoadEntryTable () <0x41b81ab0 + 0x0042f> in :0
2019-08-11 09:44:48 +07 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: Началась операция Repair
2019-08-11 09:44:49 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2019-08-11 09:44:49 +07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (3 байт)
2019-08-11 09:44:49 +07 - [Information-Duplicati.Library.Main.Operation.RepairHandler-DatabaseIsSynchronized]: Destination and database are synchronized, not making any changes

Welcome to the forum @1112

I don’t use gpg, so can’t help with usage details, but I notice commands lack ASCII dashes and quotes:

image

Black blocks in the text are characters which might need to become an ASCII character or two (e.g. --).
If that solves things, great! If not, does a backup and restore work if you skip the gpg cryptography part?

Do you mean Duplicati database repair command (it’s odd if it fixes a crypto issue) or something else?

I use python script to run this is cmd, if i don’t use GPG - all right, no problem.
i mean repair is command duplicati-cli repair…

Did you re-type each black block in embedded in text above? The originals were not using ASCII characters, just something that displays similarly, and computers tend to be rather literal in what characters they expect. Frequently one gets wrong characters from copy-paste from a web site. Punctuation is especially likely to do this, because publishing style is not always computing style.

Hyphen-minus
Unicode “Apart from dash and minus sign, Unicode has multiple hyphen characters”
Similar Unicode characters (dash varieties)
Unicode code point table (quotation mark varieties)

Here’s your original “cmd for backup”, pasted into “hexdump -C”. Check double hyphen and double quote.

00000000  2f 75 73 72 2f 62 69 6e  2f 64 75 70 6c 69 63 61  |/usr/bin/duplica|
00000010  74 69 2d 63 6c 69 0a 62  61 63 6b 75 70 0a 66 69  |ti-cli.backup.fi|
00000020  6c 65 3a 2f 2f 2f 68 6f  6d 65 2f 64 61 76 2f 75  |le:///home/dav/u|
00000030  62 75 6e 74 75 73 68 61  72 65 2f 74 65 6d 70 2f  |buntushare/temp/|
00000040  64 75 70 6c 69 63 61 74  79 42 61 63 6b 75 70 2f  |duplicatyBackup/|
00000050  64 65 73 74 69 6e 61 74  69 6f 6e 73 2f 62 61 63  |destinations/bac|
00000060  6b 75 70 73 46 6f 6c 64  65 72 2f 74 65 73 74 5f  |kupsFolder/test_|
00000070  62 61 63 6b 75 70 47 50  47 33 2f 0a 2f 68 6f 6d  |backupGPG3/./hom|
00000080  65 2f 64 61 76 2f 75 62  75 6e 74 75 73 68 61 72  |e/dav/ubuntushar|
00000090  65 2f 74 65 6d 70 2f 64  75 70 6c 69 63 61 74 79  |e/temp/duplicaty|
000000a0  42 61 63 6b 75 70 2f 73  6f 75 72 63 65 2f 62 61  |Backup/source/ba|
000000b0  63 6b 75 70 31 0a 2d 2d  65 6e 63 72 79 70 74 69  |ckup1.--encrypti|
000000c0  6f 6e 2d 6d 6f 64 75 6c  65 3d 67 70 67 0a 2d 2d  |on-module=gpg.--|
000000d0  67 70 67 2d 65 6e 63 72  79 70 74 69 6f 6e 2d 63  |gpg-encryption-c|
000000e0  6f 6d 6d 61 6e 64 3d e2  80 93 65 6e 63 72 79 70  |ommand=...encryp|
000000f0  74 0a e2 80 9c e2 80 93  67 70 67 2d 65 6e 63 72  |t.......gpg-encr|
00000100  79 70 74 69 6f 6e 2d 73  77 69 74 63 68 65 73 3d  |yption-switches=|
00000110  e2 80 93 72 65 63 69 70  69 65 6e 74 0a 30 78 44  |...recipient.0xD|
00000120  45 39 39 35 33 32 45 43  35 44 46 37 39 34 30 e2  |E99532EC5DF7940.|
00000130  80 9d 0a 2d 2d 67 70 67  2d 64 65 63 72 79 70 74  |...--gpg-decrypt|
00000140  69 6f 6e 2d 63 6f 6d 6d  61 6e 64 3d e2 80 93 64  |ion-command=...d|
00000150  65 63 72 79 70 74 0a 2d  2d 70 61 73 73 70 68 72  |ecrypt.--passphr|
00000160  61 73 65 3d 75 6e 75 73  65 64 0a 2d 2d 62 61 63  |ase=unused.--bac|
00000170  6b 75 70 2d 6e 61 6d 65  3d 74 65 73 74 5f 62 61  |kup-name=test_ba|
00000180  63 6b 75 70 47 50 47 33  0a 2d 2d 64 65 62 75 67  |ckupGPG3.--debug|
00000190  2d 6f 75 74 70 75 74 3d  74 72 75 65 0a 2d 2d 6c  |-output=true.--l|
000001a0  6f 67 2d 66 69 6c 65 2d  6c 6f 67 2d 6c 65 76 65  |og-file-log-leve|
000001b0  6c 3d 56 65 72 62 6f 73  65 0a 2d 2d 6c 6f 67 2d  |l=Verbose.--log-|
000001c0  66 69 6c 65 3d 2f 68 6f  6d 65 2f 64 61 76 2f 75  |file=/home/dav/u|
000001d0  62 75 6e 74 75 73 68 61  72 65 2f 74 65 6d 70 2f  |buntushare/temp/|
000001e0  64 75 70 6c 69 63 61 74  79 42 61 63 6b 75 70 2f  |duplicatyBackup/|
000001f0  64 65 73 74 69 6e 61 74  69 6f 6e 73 2f 6c 6f 67  |destinations/log|
00000200  73 46 6f 6c 64 65 72 2f  74 65 73 74 5f 62 61 63  |sFolder/test_bac|
00000210  6b 75 70 47 50 47 33 2e  74 78 74 0a              |kupGPG3.txt.|
0000021c

At least per its man page, gpg wants double hyphen on its options (this is probably typical). Instead it got
e2 80 93 (look at gpg-encryption-command) in front of its “encrypt”. That character is Unicode EN DASH. Possibly when retyping you will be able to see a slight visual difference, but this may depend on your font.