
How I encrypt my data in the cloud - robertjfclarke
https://robertclarke.com/cloud-encryption/
======
imiric
I wouldn't trust a closed-source tool like Boxcryptor for encryption of
sensitive data. Cryptomator looks interesting, though it's still a relatively
new tool, and I'd be hesitant to rely on it.

For my personal backups I use a combination of tar, pixz, and GnuPG. There's
no fancy deduplication, and it's definitely not efficient, but it's relatively
simple and I can restore individual files with ease.

I run a variation of the following command occasionally:

    
    
      tar -C / \
        --exclude='dev/*' \
        --exclude='home/*/.cache' \
        --exclude='lost+found' \
        --exclude='mnt/*' \
        --exclude='proc/*' \
        --exclude='run/*' \
        --exclude='sys/*' \
        --exclude='tmp/*' \
        --exclude='var/cache/*' \
        --exclude='var/lib/docker*' \
        -cvf - . | pixz | gpg2 -e -r $PGPID \
        | ssh host 'cat > /backup/root.tpxz.gpg'
    

Then I generate an encrypted index file for quick lookups, create checksum and
PAR2 repair files, and upload all of it to Wasabi, while keeping a local copy.

Wasabi may not be the cheapest storage solution, but they have no egress
charges, which makes recovery a non-issue. Good speeds and S3 compatibility
are also great. Don't want to run an ad for them, just a happy customer.

~~~
diafygi
Isn't this basically what Duplicity does? It uses GPG to encrypt files before
sending them to the remote server.

[https://www.nongnu.org/duplicity/](https://www.nongnu.org/duplicity/)

~~~
imiric
It's been a few years since I used Duplicity, and while I liked it, I prefer
the Unixy one-thing-well approach of composing several smaller tools to
achieve what I need.

The big thing I'm missing from Duplicity are incremental backups, which is not
a strong requirement for my use case as bandwidth is cheap and I can delete
the oldest N backups to free up space.

But I gain a lot from using a combination of tools: I can easily replace each
component, and easily improve my workflow by adding more components, such as
deduplication or incremental backups if needed.

------
tdurden
Arq [1] works very well for me, it is compatible with various cloud providers
as well as personal servers.

1\. [https://www.arqbackup.com/](https://www.arqbackup.com/)

~~~
danieldk
I love Arq. I use Arq to backup to a local server via sftp and remotely to B2
(which has very affordable storage). I have used Arq for many years, and
regularly restore files through Arq.

On Linux, I use restic, which can also backup to B2 (and via sftp, obviously).
restic has this nice feature where you can mount the backups at some
destination as a FUSE filesystem. Makes it very easy to go through backups and
recovering the bits you need.

------
StavrosK
I use Borg and rsync.net [1]. I recently switched to Restic which is pretty
much the same as Borg but doesn't need a corresponding server, it can back up
to dumb storage. It's been going well, I think I prefer it to Borg.

[1] [https://www.stavros.io/posts/holy-grail-
backups/](https://www.stavros.io/posts/holy-grail-backups/)

~~~
trulyrandom
You can also use sshfs in combination with borg to eliminate the need for the
server to support borg.

~~~
StavrosK
That doesn't work as well because borg needs fast local access to the files in
order to do deduplication etc. If you use SSHFS, it's going to be much slower,
IIRC.

~~~
trulyrandom
You're right. It does have an impact on performance. I haven't done a
comparison, but the performance is still acceptable in my experience. It
depends on the use case, but the local cache that borg maintains helps a lot
in simple cases, because any unchanged files simply get skipped.

~~~
StavrosK
Ah, that's great news. It means you can use things like B2 as well.

------
bdibs
Restic is a great choice also.

You can store files/backups/whatever encrypted with support for many popular
endpoints (local filesystem, S3, Backblaze B2).

------
Fnoord
I use Nextcloud on Synology with WebDAV. It is encrypted on the filesystem
level.

Then I use a bunch of free cloud providers (including TransIP STACK who gave 1
TB for free at some point) together with Cryptomator [1] which is a cross-
platform (Windows, Linux, macOS, Android, and Cyberduck/Mountainduck also
support it) Java program. The advantage of it, is it abstracts the filesystem
and WebDAV. So you see the decrypted data on a separate filesystem layer,
allowing all your normal applications to work. It is also FOSS and gratis.

Is it the best option? I don't know. I like the mentioned advantages. I've
never used Arq, for example, but it not working on Linux and Android is a
dealbreaker for me.

As for cold wallets, quoting the article:

> Offline wallets are the best way to go for storing a larger amount of
> cryptocurrency. I use ColdTi wallets to store multi-sig private keys. ColdTi
> is essentially just a slab of titanium that comes up with a punch set that
> can be used as a fire-proof seed backup. Very handy :)

These are useless in a case of fire.

[1] Already mentioned multiple times in other posts at the time I wrote this.
[https://cryptomator.org](https://cryptomator.org)

~~~
reacharavindh
I just tried boxcryptor in my Ubuntu Workstation. It was burning through 40%+
CPU on all 4 cores while it is not being actively used! Don't know if it is a
simple bug or just designed without an eye for resource usage.

On the other hand, I ended up learning about scrypt(written by Collin
Percival, who works on FreeBSD a lot and runs Tarsnap), and restic which in
layman's view appears to be a better borg.

~~~
kreetx
This is really weird, what might it be doing?

------
b1gtuna
Considered rclone instead of boxcryptor? If you are worried about data
security, I'd be wary of using a closed source encryption service.

------
mus1cfl0w
I do pretty much the same but moved away from Boxcryptor to Cryptomator as
it's open source :)

------
joyjoyjoy
I found it extraordinary difficult to build your own encrypted cloud.

Options:

1\. Truecrypt container. CON: Upload takes to long

2\. ecryptfs CON Always had problems getting it to work. AFAIK it is not under
current development anymore.

3\. Run a FS in a mounted contaner (Filesystem in a FILE). Slow. Not very
stable. Under no circumstance use ext4 or something like it, if you really
want to try this, use ZFS to avoid data corruption

4\. CryptFS. Great Idea but slow as f..
[https://www.cryfs.org/comparison/](https://www.cryfs.org/comparison/)

In the end I did not the cloud as a second backup for a large system (10TB)
since I found no safe, fast and reliable way.

~~~
unethical_ban
That is why I like ZFS: Its send/recv function can do block level syncing, so
while the first upload will take a while, subsequent syncs will be much
smaller.

Of course, unless you stand up your own VM with a ZFS partition, there are few
cloud options for ZFS.

~~~
rsync
"... there are few cloud options for ZFS."

There is exactly one. You can ZFS send/recv to and from an rsync.net account
that is enabled to do that:

[https://arstechnica.com/information-
technology/2015/12/rsync...](https://arstechnica.com/information-
technology/2015/12/rsync-net-zfs-replication-to-the-cloud-is-finally-here-and-
its-fast/)

[https://www.rsync.net/products/zfsintro.html](https://www.rsync.net/products/zfsintro.html)

 _OR_ you can get a plain old rsync.net account and do a "dumb" sync to it and
just configure ZFS snapshots on any schedule you like.

Ask about the "HN Discount".

------
Perceptes
I'd never heard of Boxcryptor. Does anyone else use this? I'm not sure I
understand why I need to sign up for an account to use it if its entire
purpose is to do client-side encryption.

Also, it's not quite the same functionality, but this also reminds me: For a
long time I've used Knox (by AgileBits, the same company that makes 1Password)
for encrypted disk images, but they no longer sell or maintain it. It works
just fine, but I should probably find a replacement that's still maintained,
at least for security updates. Anyone know a good alternative? VeraCrypt
(mentioned in the article) seems like one possibility.

~~~
robertjfclarke
Veracrypt is a great piece of software, but it isn't as easy to integrate
across various platforms. Boxcryptor is great because they have
iOS/Android/etc. apps.

------
techpop10
Interesting but wonder if this type of encryption ruins Dropbox business model
since it keeps them from de-duping anything. I couldn't care less about
Dropbox's business model... just curious.

~~~
newscracker
Of course any kind of encryption does make a dent in Dropbox's margins, since
Dropbox's model is to dedupe data across all its customers but yet charging
everyone as if the space used is strictly by their data alone. But the follow
up question would be how much of personal (non-public and non-shared) data do
people store vs. how much publicly available or shared data (not necessarily
free) data they store in their Dropbox accounts for this to make enough of a
dent.

------
xchaotic
"$4 per TB/month" so 16 X 12 = $192+tax not a insignificant amount even in a
first world country and probably a deal breaker for people living in poorer
countries.

~~~
GordonS
4TB is a lot of personal data - $192/y for that isn't _cheap_ , but I wouldn't
call it _expensive_ either for a first world country. And I suppose syncing
masses of personal data to an archive across the world is kind of a 1st world
problem.

~~~
judge2020
For comparison, Google One offers 2TB for $10 a month and the next tier is
10tb for $100 a month (the only downside is having to use Google Drive)

------
burmecia
I think the best approach is never save unencrypted data on cloud. Always
encrypted on client first. But by that way we lost dedup capability, so we
have to do everything, such as encryption, dedup and compression on client
side. I made an in-app file system dedicated for that purpose.
[https://github.com/zboxfs/zbox](https://github.com/zboxfs/zbox)

~~~
viraptor
> But by that way we lost dedup capability

This depends on how secret do you want your data to be. You could use block-
based encryption/compression and backup. That way you can still dedup
encrypted result.

If anyone can inject data into your system and monitor the backup, they could
learn when they hit collisions, but for most personal backup cases that's
irrelevant.

~~~
burmecia
I don't think the encrypt-then-dedup is a safe way to protect data privacy. In
this case, identical blocks need to produce same cipher text, this will
actually leak your data pattern even though it is encrypted. A better way I
think is using randomly-seeded derived keys to encrypt each block, thus the
identical blocks' cipher text will always be different.

~~~
viraptor
Yes, if that's more important to you than dedup savings, then you should
definitely do that.

------
sandGorgon
Or use Tarsnap.com - Online backups for the truly paranoid

~~~
amelius
It uses content-dependent splitting of blocks (for deduplication), and I'm too
paranoid to accept that block-sizes will not reveal anything about my stored
data.

[https://www.tarsnap.com/download/EuroBSDCon13.pdf](https://www.tarsnap.com/download/EuroBSDCon13.pdf)

~~~
pnutjam
Try cryFS. [https://www.cryfs.org/](https://www.cryfs.org/)

------
netheril96
Time to advertise my open source encryption filesystem:
[https://github.com/netheril96/securefs](https://github.com/netheril96/securefs)

------
ur-whale
None of the tools described in the article are open-source. Call me paranoid,
but that doesn't pass my bar, both from a security pov and from a long-term
recover-ability pov.

~~~
NKosmatos
Veracrypt [0] is open source and has passed a security audit in the past (when
it was forked from (Truecrypt). I use it for encrypted volumes and it has
extra features for the truly “paranoid”. Combine this with Backblaze and
you’ve got yourself a good secure backup for sensitive/personal data. [0]
[https://www.veracrypt.fr/code/](https://www.veracrypt.fr/code/)

------
Youden
I like encrypted ZFS snapshots. There are tools to automate the process of
creating and uploading them and they handle incremental backup and restore
painlessly.

------
inovica
I tried Boxcryptor, but didn't like how it worked, so have built something
else myself and been using it in one of my companies (distributed) for over a
year now. The side benefit is that by being able to encrypt at the folder
level I now can give different permissions to different teams but within the
one Dropbox account. If anyone is interested in a beta when I release it drop
me a message - contact info in my profile

------
willtim
I've been working on my own encrypted and de-duplicated backup solution using
libsodium. It's early days and progress is slow with limited spare time, but
it works well enough for my own use already. I wanted to avoid any closed
source or even lesser-used open-source encryption.

[https://github.com/willtim/Atavachron](https://github.com/willtim/Atavachron)

------
m0zg
I just do Backblaze with a client-side key. Cheap and effective. I do wish
they had a Linux daemon client. I'd pay more for that.

~~~
sreitshamer
FYI, to restore your files with Backblaze, you'll have to give them your key.
They then decrypt your files and leave them in an unencrypted zip file on
their servers for you to download.

~~~
m0zg
And also: their app is closed source, so I'm kind of already trusting them
with my encryption key.

------
bronco21016
I use Cryptomator tied to a WebDAV instance on my server for most of the same
use cases. The one thing I feel it’s missing is a gallery type feature for
photos so you can see thumbnails and swipe left to right through the files.
I’m not sure how this would work in practice with the encryption but it would
really make it a killer encryption app for me.

~~~
cheschire
It really is the only missing feature. It gets frustrating trying to show a
specific photo from an event to a friend when I have to guess which number in
a series a photo was.

------
noisy_boy
I used to put my data on dropbox but I'm increasingly not comfortable putting
my personal data on devices out of my control. Now I just do a daily local
rsync backup. I also use syncthing to keep the documents, music and photos in
sync between my laptop and phone (with all that, my phone's 128GB storage is
less than 60% utilized).

~~~
robertjfclarke
Boxcryptor solves that problem for the most part... That being said, rsync
works really well. I use it to copy files to and from the Synology.

------
psim1
I'm considering a Cloudberry Labs (freeware/personal) + BB B2 combination for
encrypted cloud backups and would like to hear opinions specifically on the
Cloudberry part. I love the command-line suggestions in this comment thread
but need something that "just works" as a Windows service for my wife's pc.

------
mirimir
I like Boxcryptor too. But I've never liked Truecrypt/Veracrypt. I only use
Linux, so my machines and external drives all use LUKS.

Also, I use VMs a lot, so LUKS encrypted VDI is my Truecrypt/Veracrypt
equivalent. One advantage is the ability to use dynamically allocated DVIs. So
VDIs can start small, and grow as you add more data.

------
misterdata
I have been running Resilio Sync [1] (formerly BitTorrent Sync) for a while
now, it also supports an 'encrypted peer' and has support for all the major
platforms.

[1] [https://www.resilio.com](https://www.resilio.com)

~~~
petronio
I also use Resilio Sync for distributing backups with encrypted peers, but I
use Borg to backup into the folder for compression, de-duplication, and really
easy PIT recovery. I've also added rdiff-backup on one of the encrypted peers
in case the write host gets hit with ransomware and the backup overwritten.

------
bni
I use this bash script: [https://github.com/bni/encrypt-
backup/blob/master/encrypt-ba...](https://github.com/bni/encrypt-
backup/blob/master/encrypt-backup.sh)

------
nocture
I recently did a small setup on my Synology consisting of a simple script
that:

\- Tars folders I want to backup

\- Encrypts using GnuPG

\- Uploads encrypted files to S3 (Glacier).

Simple and cheap cloud backup for me + nothing had to be installed on my NAS
except for docker to run GnuPG and AWS CLI in containers.

~~~
dpcx
I'm not sure if it runs on Synology, but duplicity handles most of this OOTB,
and handles incrementals as well.

------
brian_herman__
I’ve heard getting your data recovered from a Synology nas is difficult if not
impossible

~~~
robertjfclarke
They have an app "Cloud Sync" which replicates the entire NAS onto a cloud
provider. I do a backup to Azure, as mentioned in the post, which makes it
easy to recover in the event of something going haywire.

------
CloudBuddy
This is what I use- [https://github.com/Scott-Kaplan/Client-Side-Encrypted-
Backup...](https://github.com/Scott-Kaplan/Client-Side-Encrypted-Backups)

------
craftoman
Last time checked it's better to avoid fixed encrypted partitions. I didn't
look into it any further but uploading a 100mb partition file every time for a
5mb doc file it's not practical.

------
barking
I used to use boxcryptor + dropbox at one time but now I use sync.com which is
like boxcryptor + dropbox rolled into one.

------
plg
Arq? I know it’s Mac specific. What about an Arq -> google-cold-storage
solution?

------
ozim
7zip with aes-256 and random pw in password manager should be enough I think.

------
persona
>I’m curious to hear your thoughts on my personal data security strategy

security tools = 10 opsec = 0

~~~
orev
It would be more informative if you actually explained your position.

