0

Newbie question: Currently I'm using RSYNC to backup my files from my computer to an External HD that is always connected to my computer.

rsync -avzr /home/user/folder1/ /media/hd1/folder1/

My goal is to encrypt this backup on the external HD, so I'm looking for a way to create a script with the followig flow:

  • Decrypt External HD folder
  • RSYNC files to external HD
  • Encrypt External HD folder

Is there a way to achieve this script, maybe using native ubuntu commands or maybe using VeraCrypt, something like that?

  • 3
    You can give this task to sync tool, so you will save time. Look to Duplicity. This info I got here – Redbob Sep 22 '17 at 14:22
0

One alternative is to backup to a file system in an encrypted container, for example LVM with LUKS encryption, 'encrypted disk'). This is one install option of Ubuntu (I think mainly intended for laptops).

Maybe this link will help you,

help.ubuntu.com/community/ManualFullSystemEncryption


Edit: You can try use the easy method, simply install Ubuntu with 'encrypted disk' in the external drive. You can boot into it in another computer and run rsync via a local network, but you can also connect the drive directly, mount the partition with the correct credentials and use it directly.


It is also important to protect the backup from fire or theft physically (for example by keeping one backup drive in another house or in a safe vault).

  • I glad to read that my answer is useful for you :-) Good luck and remember to share your experiences (what works, and where you need more help). -- I'm no expert in LVM and LUKS, other people know much more, and let us hope they will share their knowledge, if you need it. – sudodus Sep 22 '17 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.