how to sync with google drive?

Status
Not open for further replies.

Havard79

Dabbler
Joined
May 22, 2017
Messages
14
i'm wondering if it is possible to rsync (or rclone /rclone.org) data with google drive..
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
You'd have to do so via a VM, mounting a zvol in the VM on where you want your Drive data saved to, ensuring the 2nd zvol for Google Drive has a filesystem Drive allows for.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Can you explain it simple to me? I'm a newbie
VMs require zvolumes instead of datasets, with both being created from the WebGUI -> Storage tab. You'd then mount the zvol to the VM (WebGUI -> VM), and configure an OS, such as Ubuntu, by installing Google Drive and selecting the zvolume you created for the Google Drive storage location. You can then rsync data to/from.

Another option is to utilize NextCloud in a jail to create your own cloud based storage that's accessible from WAN. You'll be able to find better information on these options than I can provide by utilizing the forum search tool. You'll also likely find wikis on how to do the above, and the FreeNAS 11 User Guide is a must for referencing.
 

Havard79

Dabbler
Joined
May 22, 2017
Messages
14
Okay, I have installed freenas 9.10 and nextcloud..
When I jexec nextcloud_1 sh I find a folder named www/apache24 but it contains no config files..
Where are the apache24 config filesstored? So I can add ssl etc?

I'm trying to add a external drive like Google Drive.. But getting errors from Google.. So it would be nice with https support
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You'd have to do so via a VM,
Huh?
  • Create a jail
  • Add desired storage (i.e., the directories/datasets you want to synchronize with Google Drive) to jail
  • pkg install rclone
  • Configure rclone to sync with Google Drive account
No need for a VM, no need for zvols.

Edit: pkg install rclone will install rclone 1.33; the current is 1.36. If you want the current version, download it from rclone.org and install it per their instructions. Then continue.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Where are the apache24 config filesstored? So I can add ssl etc?
What does this have to do with synchronizing with Google Drive?
I'm trying to add a external drive like Google Drive.. But getting errors from Google.. So it would be nice with https support
What does https have to do with Google Drive? And what does Nextcloud have to do with the subject of this thread?

It might be helpful if you explained a bit more clearly exactly what you're wanting to do.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yesterday afternoon, my post about rclone was hypothetical; now I have it set up and working. It seems to work fine; it's syncing merrily away to my account, encrypting data as it goes, and chewing up all my bandwidth in the process. I'll need to work out some kind of traffic shaping or bandwidth limiting, obviously.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I just share a dataset and use synctoy to sync the backups to my desktop and have the desktop folder synced with Google drive.
 

Jcwang59

Cadet
Joined
Aug 10, 2015
Messages
5
Hi danb35,
I try to do the same thing with you to create a jail and install rclone in it. And I had sone it well. But when I launch rclone config, I pending on

Storage> 7
Google Application Client Id - leave blank normally.
client_id>
Google Application Client Secret - leave blank normally.
client_secret>
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine or Y didn't work
y) Yes
n) No
y/n> y
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...

and it wait for long long time without any browser launch. So I can't login and auth. to get access.

My Freenas is 9.10.

Can you let me know what's wrong with me? Thanks!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'd also note that those instructions were a little misleading to me, in that I didn't need to run rclone on the second machine--maybe that's a difference between authorizing for Amazon Cloud Drive and Google Drive. On the second machine, I only needed to open a browser, sign in to the Google account, authorize rclone, and then copy and paste the authorization code into the terminal window where I was running rclone.
 

ChrisHolzer

Dabbler
Joined
Apr 6, 2017
Messages
23
Huh?
  • Create a jail
  • Add desired storage (i.e., the directories/datasets you want to synchronize with Google Drive) to jail
  • pkg install rclone
  • Configure rclone to sync with Google Drive account
I tried this but when I add storage to the jail then not just "source" but also "destination" is required. What do I select there? :S

Also is one rclone jail able to sync multiple cloud storage accounts? Or do I need one rclone jail per account.

FreeNAS11

Thanks! :)
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Source is the storage location located on FreeNAS (i.e. a dataset or directory on a dataset). Destination is the mount point on the jail the FreeNAS storage will be mounted on
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I tried this but when I add storage to the jail then not just "source" but also "destination" is required. What do I select there? :S
http://doc.freenas.org/11/jails.html#add-storage
Also is one rclone jail able to sync multiple cloud storage accounts?
Multiple cloud accounts are fine--configure them separately with rclone config and give them different names, and you're fine.

Edit: I'd also note that rclone probably doesn't need to be in a jail at all. It's a self-contained binary, and could easily be placed on your pool somewhere without creating a jail for it. My first crack at it was to make a jail, and that works just fine, but it's probably an unnecessary complication.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
RE: rclone - I found this so interesting and it got me thinking. Being rsync, I'm assuming any deletions on the Google Drive web interface would propagate to FreeNAS? Correct?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
rclone is not rsync, and I'm not sure how much, if anything, the two have in common. The sync with rclone is one-way, so if I do rclone sync sourcedir/ gdrive:destdir/, it's going to make destdir look like sourcedir. Files in destdir that aren't in sourcedir, as I understand it, would be deleted. If you used rclone copy instead, those files wouldn't be deleted, but they also wouldn't be copied to sourcedir.
 
Status
Not open for further replies.
Top