Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

Backup files on GMail under Linux or Unix

Type: Terms
Networking, Programming and Graphics - Tutorials
Level: Expert Networking, Programming and Graphics - Tutorials Networking, Programming and Graphics - Tutorials Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2009-May-31
Networking, Programming and Graphics - Tutorials
Visited: 1776 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Tony Potter

This tutorial is about to give you some directions how you can use your Gmail account for online storage of your Linux or Unix files. This tutorial level is for experts and it won’t be a walkthrough, but will give you just sense, what to do in order to use GmailFS.

Another thing that I must say before continue: It is better to use this way storing your files only for secondary backup!

First because it is not so user friendly and second because we do not know when Google will stop this service as it is not officially supported. They earn money showing ads and definitely this is not a way that you can see any.

In more positive manner of looking ,this service is available since 2007 and still running. Also Google provide IMAP for their mail users, which is also not so add showing way. So, maybe they will leave it as it is.

Anyway if you want to store / backup files or if you just want to try the service, you will need to install GmailFS. GmailFS ( Gmail File System) is available for almost all *nix distributions.

I will touch most used, but if you are using not so common distribution, you can learn how you can do it from a source.

For the rest you will need to gather the package ‘gmailfs’ for your distribution.

For Fedora use:
#yum install gmailfs
For Debian to install gmilfs use:
#dpkg -i gmailfs
And for Ubunto gmailfs
#aptitude install gmailfs python-setuptools
Accept all the dependencies and do not forget to update your ‘libgmail’, also using your distribution installer.

The next step is to mount the GmailFS.

With the next command it will be mounted in a folder on your *nix system.

mount -t gmailfs /usr/local/bin/gmailfs.py /mnt/gmailfs -o username=user,password=pass,fsname=zOlRRa

The mount folder will be /mnt/gmailfs, so you need to create it with “mkdir /mnt/gmailfs” command.

Then If there are no errors, just create one test file and using the ‘cp’ command copy it (upload it) to that folder.

Unfortunately as I said Google do not provide full support about this method of uploading (backup files), so the files there will have funny names.
Backup files on GMail under Linux or Unix
As you can see it looks awful. This is a list of three files uploaded with this method. The first is called just a test with 1KB size, the second is test.bin - 10MB dummy file created with the tutorial from the above link, and the third is 100 MB created again with the same tutorial.

Why as they are only three files there are 8 attachments?
Honestly I do not know.

Probably it depends of how the GmainFS works, but the biggest files size there is not more than 5120K.

Now, maybe you are asking yourself ‘..for what I need that as it splits my files?”
Well, the funniest part is if you copy the file back (certainly with the same filename - so you need to remember it), it will be again with its full size without any changes.
I made some database backups upload and download them and there were no issues.
Even that it is recommended to use this way as a secondary backup.

Other “bad” thing is that there is no ‘ls’ command. Actually there is, but it shows nothing.
Backup files on GMail under Linux or Unix
Yeah, it is saying ‘total 5’, but the screenshot is before the upload of the second file. Well at least it is giving some numbers.

‘df” command cope better:
Backup files on GMail under Linux or Unix
Well, in general that’s how to backup files on GMail under Linux or Unix. For more information and source install please visit GmailFS site.
Rate this tutorial:                    
Post Comment

Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: