How to synchronize and encrypt a folder to cloud services

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jackmint
Level 1
Level 1
Posts: 19
Joined: Fri Nov 25, 2022 11:02 am

How to synchronize and encrypt a folder to cloud services

Post by jackmint »

Hi,
I was wondering what would be a suitable method on linux to synchronize and encrypt files inside a folder to cloud services.
No professional needs, so it should be free possibly.

Thank you
Last edited by LockBot on Tue Sep 19, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
axrusar
Level 7
Level 7
Posts: 1512
Joined: Sat Jan 30, 2021 5:30 pm

Re: How to synchronize and encrypt a folder to cloud services

Post by axrusar »

More details needed...

But an option could be, using borg backup.
You would need a linux server in the cloud with borg installed.
Then you create a repository on that server from your client machine, and sync any local folder you want to the remote server.
By default, the backup is encrypted.
https://www.borgbackup.org/
I use it to backup a server automatically every day and is by far the best i have tried.
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
jackmint
Level 1
Level 1
Posts: 19
Joined: Fri Nov 25, 2022 11:02 am

Re: How to synchronize and encrypt a folder to cloud services

Post by jackmint »

axrusar wrote: Sun Mar 19, 2023 11:57 am More details needed...

But an option could be, using borg backup.
I heard about borg already, but it seems you need another linux [server] machine online though.
maybe I could use it to sync a folder to another local linux machine, but it is not exactly what I was looking for.
Thanks
User avatar
axrusar
Level 7
Level 7
Posts: 1512
Joined: Sat Jan 30, 2021 5:30 pm

Re: How to synchronize and encrypt a folder to cloud services

Post by axrusar »

jackmint wrote: Sun Mar 19, 2023 12:04 pm
axrusar wrote: Sun Mar 19, 2023 11:57 am More details needed...

But an option could be, using borg backup.
I heard about borg already, but it seems you need another linux [server] machine online though.
maybe I could use it to sync a folder to another local linux machine, but it is not exactly what I was looking for.
Thanks
You still not properly describing what your scenario is. "inside a folder to cloud services"
So you have no access to a linux server? is it windows? or what kind of "cloud services" are you referring to?
Still, borg can be suitable here. You can sync a folder locally on the same computer, then use "cloud services" like dropbox/google drive/one drive
to keep that encrypted folder in sync. Totally private.
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
User avatar
BwingBob
Level 3
Level 3
Posts: 183
Joined: Fri Sep 03, 2021 1:43 am
Location: Texas, USA.

Re: How to synchronize and encrypt a folder to cloud services

Post by BwingBob »

You might want to take a look at BorgBase https://www.borgbase.com/. I do not use BorgBase, but I am using Vorta with a self hosted repository. BorgBase offers a free plan with 10GB of storage and 250GB for $2 us a month.

Bob
Pop_OS! 22.04 {Dell Inspiron 15 5510}
Linux Mint Cinnamon 21 {Minisforum UM700}
Pop_OS! Thelio Mira ;-)
We have met the enemy and he is us. - Pogo
jackmint
Level 1
Level 1
Posts: 19
Joined: Fri Nov 25, 2022 11:02 am

Re: How to synchronize and encrypt a folder to cloud services

Post by jackmint »

axrusar wrote: Sun Mar 19, 2023 12:13 pm
You still not properly describing what your scenario is. "inside a folder to cloud services"
So you have no access to a linux server? is it windows? or what kind of "cloud services" are you referring to?
Still, borg can be suitable here. You can sync a folder locally on the same computer, then use "cloud services" like dropbox/google drive/one drive
to keep that encrypted folder in sync. Totally private.
I want to sync and encrypt a folder (docker container data mostly) on my headless linux Ubuntu server to an online basic backup service like google drive.

Yes, borg can still be suitable for my needs here if I can sync the folder from my linux server to google drive directly (I don't know if google drive works on a linux machine) or first to my Windows 10 PC on the same LAN in which runs a google drive service and from then to google drive in the cloud.
Thanks
Last edited by jackmint on Sun Mar 19, 2023 1:28 pm, edited 1 time in total.
jackmint
Level 1
Level 1
Posts: 19
Joined: Fri Nov 25, 2022 11:02 am

Re: How to synchronize and encrypt a folder to cloud services

Post by jackmint »

BwingBob wrote: Sun Mar 19, 2023 12:45 pm You might want to take a look at BorgBase https://www.borgbase.com/. I do not use BorgBase, but I am using Vorta with a self hosted repository. BorgBase offers a free plan with 10GB of storage and 250GB for $2 us a month.

Bob
very interesting indeed. 10GB can be enough for now, and 250GB for $2 per month sounds to be like a good deal.
Thanks
User avatar
axrusar
Level 7
Level 7
Posts: 1512
Joined: Sat Jan 30, 2021 5:30 pm

Re: How to synchronize and encrypt a folder to cloud services

Post by axrusar »

jackmint wrote: Sun Mar 19, 2023 1:23 pm
I want to sync and encrypt a folder (docker container data mostly) on my headless linux Ubuntu server to an online basic backup service like google drive.

Yes, borg can still be suitable for my needs here if I can sync the folder from my linux server to google drive directly (I don't know if google drive works on a linux machine) or first to my Windows 10 PC on the same LAN in which runs a google drive service and from then to google drive in the cloud.
Thanks
Ok thats a lot more clear :mrgreen:

First idea it comes to mind:
1. Setup a mint VM on your windows 10 PC with virtualbox (provided you have sufficient specs for it). The vm can have just a few GB of ram, you don't need anything crazy. Set the network in bridged mode with your LAN adapter so you will have the VM in the same net reachable from your Ubuntu server.

2. Setup a local shared folder on the VM after you installed the VB guest additions. Set this folder to be the google drive folder on your windows PC.

3. Setup borg in the Mint VM and the Ubuntu server.

4. Create your borg repository from the Ubuntu server to the Mint VM, and pick the mounted shared folder (google drive) on the VM as the destination.
Here you will need to pick SAMBA, or SSH, i think ssh would be the best idea.

5. Run the backup jobs with your desired schedule using cron on the Ubuntu server. Also pick the compression level (you got 15GB free on google drive)

This is a simplified summary of steps. You will need to learn a bit how to use borg tho.. and setup a script to run the backups with the desired options. I can help you with that just let me know.

With this plan, you are actually backing up locally to your windows PC, having the option to go back to any previous point in time, encrypting the backups, being able to visually mount and browse/restore any backup version with Vorta, backing up privately to the cloud, and so on..

Just check if you need to first stop your docker containers while the backup runs or the data container can be copied at anytime.
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
jackmint
Level 1
Level 1
Posts: 19
Joined: Fri Nov 25, 2022 11:02 am

Re: How to synchronize and encrypt a folder to cloud services

Post by jackmint »

axrusar wrote: Mon Mar 20, 2023 2:39 am
First idea it comes to mind:
1. Setup a mint VM on your windows 10 PC with virtualbox (provided you have sufficient specs for it). The vm can have just a few GB of ram, you don't need anything crazy. Set the network in bridged mode with your LAN adapter so you will have the VM in the same net reachable from your Ubuntu server.

2. Setup a local shared folder on the VM after you installed the VB guest additions. Set this folder to be the google drive folder on your windows PC.

3. Setup borg in the Mint VM and the Ubuntu server.

4. Create your borg repository from the Ubuntu server to the Mint VM, and pick the mounted shared folder (google drive) on the VM as the destination.
Here you will need to pick SAMBA, or SSH, i think ssh would be the best idea.

5. Run the backup jobs with your desired schedule using cron on the Ubuntu server. Also pick the compression level (you got 15GB free on google drive)

This is a simplified summary of steps. You will need to learn a bit how to use borg tho.. and setup a script to run the backups with the desired options. I can help you with that just let me know.

With this plan, you are actually backing up locally to your windows PC, having the option to go back to any previous point in time, encrypting the backups, being able to visually mount and browse/restore any backup version with Vorta, backing up privately to the cloud, and so on..

Just check if you need to first stop your docker containers while the backup runs or the data container can be copied at anytime.
I would have liked to synchronize a folder on linux to the cloud service directly, so that any change, even in each file, would be copied to the sync folder on the cloud in real time, but it doesn't seem to be as easy to accomplish as it is on Windows. So, I will probably make do with backups and encryption at regular intervals via borg.
Your solution too can fit my needs, and I am going to think about it carefully. Anyway, I also want to keep it as simple as possible, and I'd like to experiment with borg and borgbase now. If I got it right, you don't need another linux machine with borg running on it (the "destination VM" in your example above) if you use borgbase, right?
Thanks
Locked

Return to “Software & Applications”