================================================================================================================================================================

Generate encrypted 7zip files

bash zip

Using 7zip files as encrypted backups is a quick and dirty workaround for a proper backup solution.

First generate a strong password, e.g.: pwgen -1sB 128

Backup without compression

7z a -mx=0 -mhe=on -m0=Copy -p"$PASSWORD" TARGET.7z SOURCE_FOLDERS_*

Backup with compression

7z a -mx=3 -mhe=on -ms=on -p"$PASSWORD" TARGET.7z SOURCE_FOLDERS_*

Check the archive file

7z l -slt -p"$PASSWORD" TARGET.7z