The benefit of having extra storage - outside of your virtual private server's filesystem - is evident whenever the need to back up configuration files or important documents arises. This guide explains how to configure a FUSE (Filesystem in UserSpacE) which uses a Gmail account to store and retrieve files.
Download and Compile FUSE from Source
- Enter mkdir /root/fuse; cd /root/fuse to create a directory to store your FUSE installation and switch to the directory
- Enter wget -S http://downloads.sourceforge.net/fuse/fuse-2.7.2.tar.gz to download the FUSE source code
- Enter tar xzvf fuse-2.7.2.tar.gz; cd fuse-2.7.2 to unpack the source code and switch to the unpacked directory
- Enter ./configure to begin compiling FUSE
- Enter make and then make install to complete the installation
Download and Compile fuse-python from Source
- Enter mkdir /root/fuse-python; cd /root/fuse-python to create a directory to store your fuse-python installation and switch to the directory
- Enter wget -S http://downloads.sourceforge.net/fuse/fuse-python-0.2.tar.gz to download the fuse-python source code
- Enter tar xzvf fuse-python-0.2.tar.gz; cd fuse-python-0.2 to unpack the source code and switch to the unpacked directory
- Run python setup.py build to build the fuse-python package
- Run python setup.py install to install fuse-python
- Enter shutdown -r now to reboot your VPS
Download and Install libgmail from Source
- Enter mkdir /root/libgmail; cd /root/libgmail to create a directory to store your libgmail installation and switch to the directory
- Enter wget -S http://downloads.sourceforge.net/libgmail/libgmail-0.1.8.tar.gz to download the libgmail source code
- Enter tar xzvf libgmail-0.1.8.tar.gz to unpack the source code
- Switch to the unpacked directory with cd libgmail-0.1.8
- Run python setup.py build to build the libgmail package
- Run python setup.py install to install libgmail
Download and Configure gmailfs
- Enter mkdir /root/gmailfs; cd /root/gmailfs to create a directory to store gmailfs and switch to the directory
- Enter wget http://richard.jones.name/google-hacks/gmail-filesystem/gmailfs-0.8.0.tar.gz to download the gmailfs files
- Enter tar xzvf gmailfs-0.8.0.tar.gz; cd gmailfs-0.8.0 to unpack the files and switch to the unpacked directory
- Copy the gmailfs files into your system file structure:
- cp gmailfs.py /usr/local/bin/
- cp mount.gmailfs /sbin/
- cp gmailfs.conf /etc/
- Edit /etc/gmailfs.conf to add your Gmail account e-mail address and password
Test your Gmail FUSE Drive
- Enter mkdir /gmail to create a directory for use with the Gmail/FUSE solution
- Enter mount -t gmailfs /usr/local/bin/gmailfs.py /gmail -o fsname=zOlRRa to map /gmail to your Gmail account as a filesystem
- Try copying and retrieving a file to confirm that your setup was successful