Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
DISCLAIMER: Uploading to a cloud storage system implies that you trust the maintainers of that system and everyone in-between to not mess with/read your data. If this is a concern for you, but you want to upload to Google Drive, anyway, please consider using some of the encryption methods mentioned here (or another encryption method of your choosing): http://how-to.linuxcareer.com/using-...ages-and-files
Thanks to mostlyharmless for the tips!
It took me a while to find a good, simple, reliable way to backup my stuff to Google drive, using rsync; so I've decided to share my method with the good people at LQ. In short, the answer is to use "gsync" (NOT "grsync", which is different and broken/incomplete). It supports (so far as I can tell) ALL the same options as rsync (glee!), and lets you do it with Google Drive! You can upload to, and download from GD in this way, by picking which to use as SOURCE/DESTINATION folders.
You can check what the options do using "man rsync." I don't always use the "-c" option, since it's slow (but more thorough for checking the data). This command will delete files that are missing from the destination, and overwrite duplicates. Use with care! Note the trailing slash on the source folder; this is important! A trailing slash on the source folder means to copy the stuff IN the folder to the destination. No slash means to copy the folder, itself, to the destination. The destination folder ignores trailing slashes. (Thanks to suicidaleggroll for this clarification.)
The "gsync" version is this--from "/mnt/PERSONAL/Dane/IMPORTANTSTUFF" to "drive://IMPORTANTSTUFF":
Please note that you should probably not upload an entire 1TB+ drive to GD unless you have and want to use up all that storage space on the cloud. Therefore, I've specified the subdirectory of "/mnt/PERSONAL/Dane/IMPORTANTSTUFF" to represent the important files/folders that I absolutely have to have backed-up remotely. You'll need to run a separate command for each folder (including subdirectories) that you want to upload in this fashion; make sure to change both the source and destination in the command when you do. (I haven't yet figured out how to do them all as a batch job, short of writing a script for it.) Also, I use root (sudo) for this and the rsync command because it helps manage permissions properly--but if you're certain that the current user/login owns all the files involved, you don't need it (and probably shoudn't use it, as a general security/safety precaution).
Finally, if you want to be able to walk away from it and know how long it actually took when you come back, you can prepend the "time" command to the beginning of the gsync or rsync command, like so:
Very helpful for many people without doubt, perhaps you should also point out that you are relying on data protection/privacy on Google. You might want to consider an optional pipe through encryption.
Thanks for your kind words, mostlyharmless. I like your suggestion about encryption. I haven't messed with that very much; what would you suggest?
I've always found gpg to be a bit too...arcane...for quick-and-dirty encryption, and I've lost my private key a couple of times (partly due to not knowing where it's stored); so I'm hesitant to use any kind of encryption whose key/password I can't just remember. I know it's not as secure as a 128-bit string, but I'm sure it's a lot better than nothing.
Well, there's always a balance between securing data and being able to retrieve it isn't there? I've lost data by misplacing/losing a GPG key too. Maybe something simpler using OpenSSL, as in the examples here:
Note the trailing slash on the source folder, but NOT the destination folder; this is important! Please see the man page (or a Linux/Unix web page on rsync) for what the trailing slashes do/don't do.
The trailing slash is only important on the source, it makes no difference on the destination.
Nice HOWTO.
Problem is that the forums are not really the best place for it, would be nice if you could add it to the LQ Wiki or make a LQ Article from it.
You can find the LQ Wiki on the right side in the main menu. For work in the Wiki you have to create a new user (you can take your current username), after that just create your article in the appropriate section.
I am having a small issue. It seems all the directory structure is being created but non of the actual files. I am using all the same options you are using.
I posted that fix (based on a post elsewhere). :-)
The program is, however, experiencing a more serious bug: its app authentication key is the same one used for everyone using the program. This is normal for Google-interfacing applications, but there's a data transfer limit on any one key. This means that, once all the gsync users have exceeded that limit, then nobody can use gsync, anymore, until the quota resets. There's an open bug about it, but I don't know if it's being worked on, currently. It's really unfortunate, because I love gsync's functionality.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.