Following the method explained in Incremental backup with 7zip, I can create an archive of 10 GB of documents with
7z u -up0q3r2x2y2z1w2 -mx=0 -p -mhe=on backup.7z /path/to/documents
It's encrypted (and the filenames are encrypted too with -mhe=on
), with a password prompt.
If you change a few files (let's say 50 MB) in the source directory and you redo this command, only the modified files should be rewritten, instead of rewriting the whole 10 GB of data, and this make a huge difference.
However I noticed that this does not work if -p -mhe=on
is present. When it's present, the 10GB file backup.7z
is unchanged and a new temporary file is created that will eventually reach 10 GB too (thus we need 20 GB on this disk; this will be a problem if one day I want to do a 500 GB archive). At the end this temporary file will replace the original one.
Thus we lose the "incremental" aspect.
Question: how to make 7z
work by only updating the modified files, when using it with encryption, and not rewrite the whole archive?
mhe
uses the current time in its encryption.