Copy Google Drive to your own server over SFTP
Keep a copy of your Drive on a machine you control: a VPS, a NAS, or any server that accepts SFTP. Nothing is downloaded to your computer, and the copy can run again every night.
What you need
- A server that accepts SFTP from the internet, and its host name or address. The port is 22 unless your server uses another.
- A username, with its password or a private key, and a folder that user can write to.
- If the server accepts connections only from known addresses, add our server's address to its allow list.
Connecting Google Drive: two ways
The easy way is to sign in with Google and pick the files to copy in Google's own file chooser. ShiftMyData then sees only what you picked and what it creates itself, which suits a one-off copy of chosen files. A nightly backup made this way does not see files you add to Drive later.
The whole Drive needs your own Google app: a one-time setup of about ten minutes, guided from the Connect screen. After that ShiftMyData can see everything in the Drive, which is what a backup that keeps up with new files needs.
Steps
- On the Clouds screen, add Google Drive, either way.
- Add SFTP: the host, the port if it is not 22, the username, and the password or private key.
- Open the Drive folder in the left pane and the server folder in the right.
- Choose Copy and start. To repeat it, make it a schedule, nightly or weekly; each run sends only what changed.
Start free: 30 GB on sign-up, no card, and the transfer runs on our servers.
What arrives, and what does not
- Google Docs, Sheets and Slides have no file to copy until they are exported. By default they arrive as Word, Excel and PowerPoint files; you can choose PDFs or OpenDocument files instead.
- Google Forms, and other Google files with no export format, cannot be downloaded through Google's API by anyone, so they stay in Drive.
- Where the server lets us compute MD5 or SHA-1, as most Linux servers do, every file is checked against Drive's own checksum on arrival. Otherwise files are compared by size and time.
- Drive allows two files with the same name in one folder and a server does not, so only one of each such pair arrives. Rename duplicates first if you need both.
- The speed is your server's: its connection and its disk. We open no more connections at once than the server accepts.
Questions
Can I copy to a Synology or QNAP NAS?
Yes, if SFTP is turned on in the NAS and it can be reached from the internet, for example through port forwarding on your router.
Will it delete anything on my server?
Copy never deletes. Mirror makes the server folder match Drive, so it also removes files you deleted from Drive: choose it only if that is what you want.
Try it
Prepaid: 30 GB free, then 500 GB for ₹100 or 2.5 TB (2,560 GB) for ₹500, each valid a year. No card is asked for to start.