[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to backup to an encrypted usb drive?



On 11/14/18, Jonathan Dowland <jmtd@debian.org> wrote:
> 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.

Well that's .. surprising.  I went with xfce because it's supposed to
be 'lightweight' and I'm trying debian on an old laptop.  If I go with
something other than xfce is it just mounting & unlocking the external
drive that changes or is there more?

> 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>

Wow!  A lot of good info there that's going to take me a while to
digest - thank you.

> 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;

No problem re-implementing the batch file as a script :)  & I've got
unison setup to compare the files to see if the backup is current or
not, so the archive bit doesn't come into play there.

> I'd recommend
> taking a look at rsync for performing the copy.

I've used rsync at work.  It was fast & good enuf for keeping my files
on different machines consistent but I never figured out how to sync
everything except <some list of files/directories>  eg. backing up
~/.cache seems like a waste of time & disk space.

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

Which can take a long time & tends to back up way more than I want.
Or is there a way to give it a list of files & directories to ignore?
That was the main reason I liked unison - it's easy to create a list
of files/directories to ignore.

Thanks
Lee


Reply to: