diff --git a/CHANGES b/CHANGES index 557174958..430daec54 100644 --- a/CHANGES +++ b/CHANGES @@ -1649,3 +1649,6 @@ [4.1.7] * Fix issue where login looped when admin bit was removed +[4.2.0] +* Fix issue where tar backups with files > 8GB was corrupt + diff --git a/src/backups.js b/src/backups.js index e3a5dcbec..e70533269 100644 --- a/src/backups.js +++ b/src/backups.js @@ -291,6 +291,9 @@ function tarPack(dataLayout, key, callback) { }, map: function(header) { header.name = dataLayout.toRemotePath(header.name); + // the tar pax format allows us to encode filenames > 100 and size > 8GB (see #640) + // https://www.systutorials.com/docs/linux/man/5-star/ + if (header.size > 8589934590 || header.name > 99) header.pax = { size: header.size }; return header; }, strict: false // do not error for unknown types (skip fifo, char/block devices)