LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 05-17-2016, 03:02 PM   #1
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,553

Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
Backup to Google Drive


This is done/tested on openSUSE and CentOS 6. It *SHOULD* work elsewhere, but your mileage may vary.
  1. Obviously, you need to set up a Google drive account. In this instance, I'm using a pay-for, $10 a month/unlimited space account.
  2. Install and configure google-drive-ocamlfuse. Website here: http://gdfuse.forge.ocamlcore.org/ Installation is fairly simple, but I recommend installing from console, since you'll need a web-browser for final authorization/authentication to Google. You CAN do it remotely, but export your display variable first.
  3. Install rclone, available here: http://rclone.org/ Supports different cloud services, and actually works with them.
Now, once you get those things installed, you're pretty much ready to go. The two commands I use are "rclone sync" and "rclone copy". The sync will REMOVE files on the cloud drive, if they're removed locally. Use with caution. The copy is just that...anything new/changed on the local side gets shoveled up to the cloud.

Basic script is something like:
Code:
#!/bin/bash
/usr/local/bin/rclone copy "/home/user" "googlecloud:/home/user" -v
This specifies that you're going to copy modified/added files from the local "/home/user" directory to the googlecloud named resource (you configured this when you set up rclone), into the /home/user directory there. The -v is for reporting back on what's getting done...useful for putting this in CRON, and redirecting it to a log file.

I've got my user personal directories going to /home/Users/<username> and group files to /home/Groups/<group share name>. Speed isn't awesome...but it certainly gets the job done. Let the initial 'full' backup run first, then cron this every night. Your files get up to the cloud, and you at least have a copy.

Cheap little safety net.
 
Old 05-17-2016, 08:36 PM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 281Reputation: 281Reputation: 281
I've been using rclone to sync my Dropbox and Google Drive accounts for some time. I also use it to sync my Box account to those, after mounting it locally, plus various local syncs. It works very well from cronjobs. I haven't seen the need for -v, since the entire log gets mailed to me. I suppose some people like redundancy, though.
 
Old 05-17-2016, 10:11 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,553

Original Poster
Rep: Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037Reputation: 5037
Quote:
Originally Posted by sgosnell View Post
I've been using rclone to sync my Dropbox and Google Drive accounts for some time. I also use it to sync my Box account to those, after mounting it locally, plus various local syncs. It works very well from cronjobs. I haven't seen the need for -v, since the entire log gets mailed to me. I suppose some people like redundancy, though.
I'm one of those people. And I came across this, and thought I'd document it...tried rsync to Gdrive, but it fails almost every time, with an error I didn't bother to note. That was a month or so ago, and wanted to make sure that things were working ok with this setup...so far, I've been pleased.

Still use rsync to get local copies, though, along with OTHER 'real' backup software, but I've been bitten enough by failed backups/copies, that I REALLY like to have multiple streams.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Google Adds Your Google Drive Files To SERPs LXer Syndicated Linux News 0 10-16-2012 01:40 PM
What does Google Apps moving to google drive mean to us? dougnc Linux - General 11 09-13-2012 01:58 PM
LXer: Secure Encryption on any cloud (backup) service (google drive, dropbox, box.net etc) LXer Syndicated Linux News 0 05-01-2012 04:50 PM
Automate backup of Google Apps accounts ifeatu Programming 3 02-03-2010 01:10 PM
Copy an internal hard drive as backup? Restore an internal drive? Peufelon Linux - Hardware 2 06-15-2008 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 12:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration