New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to Synchronize a Folder on VPS Web Server with Google Drive or OneDrive?
in Help
Hello everyone,
I am currently running a web server on a VPS and need to keep a specific folder synchronized with either Google Drive or OneDrive. My goal is to ensure that any changes made in the folder on my VPS are automatically reflected on the cloud storage, and vice versa. Thank you in advance.

Comments
rclone syncrclone is the way to go
Here is an install guide:
https://rclone.org/install/
Here's how to configure it with Google Drive - https://rclone.org/drive/
Here's how to configure it with OneDrive - https://rclone.org/onedrive/
Here's how to configure the syncing - https://rclone.org/commands/rclone_sync/
Shouldn't take you any longer than 10-15 minutes to download/install/configure
Create a cronjob that runs 'rclone bisync' command every 15 minutes. It will be bi-directional but not automatic (just every 15 minutes).
If you want it to be automatic you can mount google drive using rclone and use incron (instead of cron) in order to watch for changes in any of the 2 folders and whenever a change occurs automatically run the 'rclone bisync' command, but this approach is cumbersome and not very recommended.
Additional Info As I am running websites on that server, I don't want to put too much pressure on the server to run the synchronization process. The contents of the folder only change once each day.
You can run cronjob 1 time in 24h