Encrypted backup using tar, gpg and ssh

If you want to make quick encrypted remote backup of your data, the only things you need are bash, tar, gpg and ssh.
“tar” packs your data into a single stream of bytes, “gpg” encrypts the stream and “ssh” remotely stores the encrypted stream to chosen file.

tar cv folder_to_backup | gpg -e -r gpg_user_id | ssh remote.host "cat > folder_backup.tar.gpg"

Note – you don’t need to compress “tar” stream as “gpg” during encryption compresses data for you.

Prevent selected debian package from upgrading

Recently Erlang Solutions have published a new version of esl-erlang debian package with the newest Erlang/OTP 20.0. This new major Erlang release contains a few incompatibilities with earlier versions for which we still need to update our software.

There is a simple way to temporarily prevent ‘apt-get upgrade’ from upgrading ‘esl-erlang’ package to the newest version – the only thing you need to do is to put this package on ‘hold’ with apt-mark hold els-erlang.

Later on you use apt-mark unhold esl-erlang to again allow debian package manager to upgrade this package.