Web lists-archives.com

Re: how to backup to an encrypted usb drive?




On Wed, Nov 14, 2018 at 10:01:38AM -0500, Lee wrote:
What I've been using on windows is truecrypt to encrypt the drive and
1) unison + gui frontend to do a quick backup of selected files & 2) a
bat file that calls xcopy to copy files with the archive flag set to
YYMMDD/ on an encrypted drive (ie. an incremental backup; I do a full
backup every few months)

Luckily, you can use almost the exact same tools for achieving the same
on Debian.

There are a few choices for the encryption tool you use; I suggest using
"cryptsetup", especially over a few of the alternatives (encfs, ecryptfs)
but the tooling you use to achieve this will depend upon what desktop
environment (if any) you are using.

I know that GNOME 3 (what I'm using) can detect and mount LUKS-encrypted
disks when they are attached to my machine. What I'm not sure about is
whether it can be used to create those in the first place. Although I
guess that's a one-time operation (per external USB), so not too bad to
do it via command-line tools. See man cryptsetup(1)
<https://manpages.debian.org/stretch/cryptsetup-bin/cryptsetup.8.en.html>

Once you've got the encrypted disk set up, you could use unison
similarly to how you are on Windows. You'd need to re-implement the
batch file if you wanted exactly the same behaviour for that, and
there's no direct analogue of the archive bit that I can think of, so
marking/identifying files is one part of the puzzle; I'd recommend
taking a look at rsync for performing the copy.

Or throw it all out and use something like rdiff-backup and just back up
everything…


--

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.