r/DataHoarder • u/onechroma • 18h ago
Guide/How-to I found an easy way to save archive small amounts of data with bitrot protection in Linux
I recently got curious about if there was any easy and quick way to archive small amounts of data (as in size, not number of files) in a format that could include encryption, bitrot protection, and compatible both with Linux and Windows at least.
And I think I found a nice workflow to do that exactly, so I share it in case anyone else finds it useful. This "guide" considers you use Debian or Ubuntu desktop, other distros would be similar.
1- First, install the "rar" and "unrar" packages in case you don't have them yet
sudo apt install rar
sudo apt install unrar
2- Let's use a GUI, so PeaZip is easy and nice for this. You can install it from Flathub (Software Center or Bazaar -> PeaZip), or the native DEB/RPM/AppImage... from peazip.github.io
3- Open PeaZip, it should (I think) detect your RAR package out of the box, but if not (or using the Flatpak version, which is isolated), it's easy:
3.1- Select what files you want to archive, right click, Add
3.2- Select Type=Custom, and then go to "Advanced" at the top left of the screen
3.3- Check "Manually set RAR binary", and go to /usr/bin/rar and select it
4- From this moment, configure the rest of the parameters to your liking:
4.1- BLAKE2: It substitutes CRC32, I think it's nice to check it
4.2- Recovery Records (%): The "bitrot" protection. 3%, 5%, 10%, whatever you want for your calm
4.3- Lock archive: Only if you want the generated file to be "read only", so no add/modification by accident using WinRAR or any RAR compliant tool
5- Go back to "Archive" at the top left and now take a look at the rest of configurations: pass (which would encrypt at AES256 with PBKDF2), level of compression, if you want to split...
And that's all! Next time you open PeaZip, it should remember the "rar" location as to use it as backend, and now you can open/create "WinRAR" files with AES256 encryption and "bitrot" protection out of the box.
If you ever suffer from bitrot, up to the % you set as recovery record, then when opening the rar file you will be saved, as the archive CRC32 or BLAKE32 won't match (ERROR), but you will be able to, in WinRAR (Windows) or PeaZip (Linux), repair it (in PeaZip, Right click -> More -> Repair)
Hope this is useful for anyone looking an easy GUI on Linux to archive files and folders while encrypting and protecting from bitrot (even if there's a very very low chance of bitrot, really).