How to upload a backup of files to the cloud ?

How to upload a backup of files to the cloud - The secure way:


NOTE: Never, ever upload privacy sensitive data to cloud services!

Programs needed: pv, gnupg2, progress and split

Step 1 - make a archive to reduce space usage
tar cf - /folder-with-files | pv -s $(du -sb /folder-with-files | awk '{print $1}') | gzip > files.tgz

Step 2 - encrypt your data with gnupg2
gpg -c files.tgz &
progress -mp $!

Step 3 - Calculate the size of your encrypted archive
du -sh files.tgz.gpg

Step 4 - cut the encrypted archive in parts of your desired size (100MB in this example)
split -db 100M files.tgz.gpg files.tgz.gpg.part

Step 5 - Upload the parts to your desired cloud.

Written by Erwin Oldebsten 29/05/2017


Learn More :

Prev Question