Auto backup google drive to google drive via vps

my idie auto backup google drive to google drive via vps
please help me
i can pay for helper
thank so much

That is exactly what I currently doing.

I have mounted 2 different gdrive accounts and sync them via rsync.
So, both accounts have the same data.

So my setup currently look like:
1st Google Drive: /mnt/rclone/gdrive_edu
2nd Google Drive: /mnt/rclone/gdrive_suite

Then I run the following command once a day as a cron

rsync -ru --progress /mnt/rclone/gdrive_edu/ /mnt/rclone/gdrive_suite/ --delete


Some notes:

--progress shows transfer progress
-r recursive (copy all folders and sub folders/files)
-u update the destination instead of copy everything again.
--delete deletes files from my backup gdrive if it will be deleted from my source gdrive.
(You might wanna remove it based on your needs)

Also I keep in mind that this, as it is, should just be used on a gdrive to gdrive sync running on a server with a good network connection.

I made quite a lot assumptions that need to fit otherwise the script can cause some damage.
So, the following conditions needs to be true

  • The initial sync needs to be done manually.

    I have assumed that during one day, there can't be more than 750GB new data on the "source", so we will never hit the upload limit for the backup drive.
    As the source is also a gdrive there usually can't be more than 750GB new data a day.
    Also in my setup, the "backup" drive is ONLY used by my backup script. I don't upload anything else to that gdrive.

    I would recommect to do the first sync manually and add '--bwlimit=8192' to the rsync command.

  • The sync needs to be done within of 24h

    otherwise, the cron will start the sync again even if the 1st one is still not done. So, you need a good network connection.


The proper way of doing that would be to write a script that checks all these conditions and react based on them. Always wanted to do that, but never really had time for that.

So, use my idea as a start point and do it better then me :stuck_out_tongue:

I'd suggest

--backup-dir ${TO_REMOTE}-bkup/date +%Y%m%d_%H%M%S/

so you can keep backups of replaced stuff.

Thats 100% posible, you have to create mini script. sh and then create cron to run every Day or when you want.

If you are interested you can send me mp.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.