A backup with zip64 is still failing with "Attempted to write a stream that is larger than 4GiB without setting the zip64 option"

I have a backup with a lot of files, and some of the files are large (more than 4 GiB). I did set the “zip64” option to True. Duplicati version is 2.1.0.5_stable_2025-03-04.

However, when I run the backup, it fails with the message “Attempted to write a stream that is larger than 4GiB without setting the zip64 option”:

What am I doing wrong? Is there any way to fix my configuration without splitting it into multiple backup configurations?

The complete log doesn’t seem to be shedding any light on what might be going on:

{
  "DeletedFiles": 0,
  "DeletedFolders": 0,
  "ModifiedFiles": 0,
  "ExaminedFiles": 0,
  "OpenedFiles": 0,
  "AddedFiles": 0,
  "SizeOfModifiedFiles": 0,
  "SizeOfAddedFiles": 0,
  "SizeOfExaminedFiles": 0,
  "SizeOfOpenedFiles": 0,
  "NotProcessedFiles": 0,
  "AddedFolders": 0,
  "TooLargeFiles": 0,
  "FilesWithError": 0,
  "ModifiedFolders": 0,
  "ModifiedSymlinks": 0,
  "AddedSymlinks": 0,
  "DeletedSymlinks": 0,
  "PartialBackup": false,
  "Dryrun": false,
  "MainOperation": "Backup",
  "CompactResults": null,
  "VacuumResults": null,
  "DeleteResults": null,
  "RepairResults": null,
  "TestResults": null,
  "ParsedResult": "Fatal",
  "Interrupted": false,
  "Version": "2.1.0.5 (2.1.0.5_stable_2025-03-04)",
  "EndTime": "2025-06-22T18:10:16.3001044Z",
  "BeginTime": "2025-06-22T17:24:59.661652Z",
  "Duration": "00:45:16.6384524",
  "MessagesActualLength": 5,
  "WarningsActualLength": 1,
  "ErrorsActualLength": 2,
  "Messages": [
    "2025-06-22 13:24:59 -04 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started",
    "2025-06-22 13:31:54 -04 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  ()",
    "2025-06-22 13:31:54 -04 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (5.04 KB)",
    "2025-06-22 13:31:54 -04 - [Information-Duplicati.Library.Main.Operation.FilelistProcessor-KeepIncompleteFile]: keeping protected incomplete remote file listed as Temporary: duplicati-20250305T202859Z.dlist.zip.aes",
    "2025-06-22 13:31:57 -04 - [Information-Duplicati.Library.Main.Operation.Backup.UploadSyntheticFilelist-PreviousBackupFilelistUpload]: Uploading filelist from previous interrupted backup"
  ],
  "Warnings": [
    "2025-06-22 13:31:54 -04 - [Warning-Duplicati.Library.Main.Operation.FilelistProcessor-BackendQuotaNear]: Backend quota is close to being exceeded: Using 1.26 TB of 952.62 GB (25.52 GB available)"
  ],
  "Errors": [
    "2025-06-22 14:10:16 -04 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error\r\nNotSupportedException: Attempted to write a stream that is larger than 4GiB without setting the zip64 option",
    "2025-06-22 14:10:16 -04 - [Error-Duplicati.Library.Main.Controller-FailedOperation]: The operation Backup has failed with error: Attempted to write a stream that is larger than 4GiB without setting the zip64 option\r\nNotSupportedException: Attempted to write a stream that is larger than 4GiB without setting the zip64 option"
  ],
  "BackendStatistics": {
    "RemoteCalls": 1,
    "BytesUploaded": 0,
    "BytesDownloaded": 0,
    "FilesUploaded": 0,
    "FilesDownloaded": 0,
    "FilesDeleted": 0,
    "FoldersCreated": 0,
    "RetryAttempts": 0,
    "UnknownFileSize": 0,
    "UnknownFileCount": 2,
    "KnownFileCount": 5154,
    "KnownFileSize": 1381571076410,
    "LastBackupDate": "0001-01-01T00:00:00",
    "BackupListCount": 1,
    "TotalQuotaSpace": 1022870155264,
    "FreeQuotaSpace": 27400179712,
    "AssignedQuotaSpace": -1,
    "ReportedQuotaError": false,
    "ReportedQuotaWarning": true,
    "MainOperation": "Backup",
    "ParsedResult": "Success",
    "Interrupted": false,
    "Version": "2.1.0.5 (2.1.0.5_stable_2025-03-04)",
    "EndTime": "0001-01-01T00:00:00",
    "BeginTime": "2025-06-22T17:24:59.6616579Z",
    "Duration": "00:00:00",
    "MessagesActualLength": 0,
    "WarningsActualLength": 0,
    "ErrorsActualLength": 0,
    "Messages": null,
    "Warnings": null,
    "Errors": null
  }
}

The configuration is as follows:

{
  "CreatedByVersion": "2.1.0.5",
  "Schedule": {
    "ID": 1,
    "Tags": [
      "ID=1"
    ],
    "Time": "2025-06-25T06:00:00Z",
    "Repeat": "3D",
    "LastRun": "2025-06-22T17:24:59Z",
    "Rule": "AllowedWeekDays=Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
    "AllowedDays": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday",
      "Sunday"
    ]
  },
  "Backup": {
    "ID": "1",
    "Name": "Regular backup",
    "Description": "",
    "Tags": [],
    "TargetURL": "file://C:\\Backup\\",
    "DBPath": "D:\\Duplicati\\EGRUFOCCED.sqlite",
    "Sources": [
       [redacted]
    ],
    "Settings": [
      {
        "Filter": "",
        "Name": "encryption-module",
        "Value": "aes",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "compression-module",
        "Value": "zip",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "dblock-size",
        "Value": "2048MB",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "retention-policy",
        "Value": "1W:1D,4W:1W,12M:1M",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "--zip-compression-zip64",
        "Value": "true",
        "Argument": null
      }
    ],
    "Filters": [],
    "Metadata": {
      "LastBackupDate": "20241216T174040Z",
      "BackupListCount": "11",
      "TotalQuotaSpace": "1022870155264",
      "FreeQuotaSpace": "49002057728",
      "AssignedQuotaSpace": "-1",
      "TargetFilesSize": "1423869529089",
      "TargetFilesCount": "1349",
      "TargetSizeString": "1.30 TB",
      "SourceFilesSize": "126362757837",
      "SourceFilesCount": "511357",
      "SourceSizeString": "117.68 GB",
      "LastBackupStarted": "20241216T174037Z",
      "LastBackupFinished": "20241216T200112Z",
      "LastBackupDuration": "02:20:34.7868251",
      "LastCompactDuration": "00:04:46.0741452",
      "LastCompactStarted": "20241216T195626Z",
      "LastCompactFinished": "20241216T200112Z",
      "LastErrorDate": "20250622T181016Z",
      "LastErrorMessage": "Attempted to write a stream that is larger than 4GiB without setting the zip64 option",
      "LastRestoreDuration": "00:01:10.7371464",
      "LastRestoreStarted": "20240815T053808Z",
      "LastRestoreFinished": "20240815T053919Z"
    },
    "IsTemporary": false
  },
  "DisplayNames": {
     [redacted]
  }
}

That is an unfortunate error in 2.1.0.5:

The solution is to not set the zip64 option, which will the use the built-in Zip library that supports zip64. Canary builds mark the zip64 flag as deprecated, and always toggle Zip64 for SharpCompress.

It worked! Thank you so much for the hint. I would not have guessed myself that I need to do exactly the opposite of what the error message said.