I am working on a backup process for a cloud based virtual machine.

I already have a script that will create a tar.gz file, encrypt it with my gpg public key and give it a unique name.

Now I would like to automatically upload it to an online folder. I have both dropbox and google drive and I have enough free storage on either for this task.

I want a solution which will be able to upload one file at a time to a particular folder.

I will need to authorize access to any backup app that runs unattended on my cloud VM and this cloud VM may be hacked so I want to minimal access credentials to my google drive or dropbox files:

  • Upload a new file to one particular directory
  • Can't read/edit/delete any files anywhere else
  • Can't delete or update any files even ones it has previously uploaded

I have looked at rclone (https://www.techrepublic.com/article/how-to-sync-your-linux-gui-less-server-to-your-cloud-service-with-rclone/) and grive (https://www.howtoforge.com/tutorial/sync-documents-with-google-drive-on-ubuntu-linux/) but both seem to want full access to my google drive account.

Does anyone know a way I can leverage my free google/Dropbox storage for this purpose without taking the security risk?

Update 1

I have investigated Dropbox file requests but it seems this only works using a web interface and there is no API https://www.dropboxforum.com/t5/API-Support-Feedback/Upload-a-file-via-API-to-a-file-request/td-p/265794

  • What OS are you running? Google and Dropbox both have desktop applications that add folders that will automatically sync with there respective cloud. – JBis Jul 25 '18 at 12:34
  • I am running ubuntu Server. I have seen both full syncing apps and they can be configured to sync only particular directories to particular directories but they still need access credentials to my whole drive. I want to restrict the access to minimize the damage a hacker could do if they steal credentials from/take control of the server. – Robert3452 Jul 25 '18 at 13:37
  • If they "take control of the server" you have bigger issues to worry about. – JBis Jul 25 '18 at 14:05
  • It's a small server which houses my personal website and nothing else. I can rebuild it on demand using ansible. I would just need to go into my hosting console blow away the VM and create a new one then deploy the latest backup. If they also got credentials to access/delete all the files I keep in my google drive that would be a far bigger problem! – Robert3452 Jul 25 '18 at 14:10
  • Your accounts are exclusively used for this purpose correct? – JBis Jul 25 '18 at 14:14

Your Answer

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

Browse other questions tagged or ask your own question.