- MValdez Blog - http://www.mariovaldez.net/webapps/blog -

How to install SpiderOak in Slackware 13.0 64-bits, from the command line.

This is what I did to install SpiderOak from the command line, remotely, in a headless server (a server without monitor or keyboard) and without X (without GUI).

Update (2011/03/29): The latest version of SpiderOak (v3.7.9781) for Slackware 12.1 (32-bits) seems to work fine in Slackware 13.0 (64-bits) with the multilib compatibility packages from Alien Bob [1].

SpiderOak (spideroak.com [2]) is a multiplatform software and remote backup service. There are no officials packages for Slackware 13 in the SpiderOak site. There is an older version (for Slackware 12, 32-bits only) which does not work because of some incompatibility with a Python 2.6 library (it seems SpiderOak uses its own bundled Python interpreter, but it require some system libraries like hashlib). The usual error message you receive when try to run SpiderOak is something like “ImportError: No module named _md5”.

This is what I did:

Step 1. Downloaded the package for Fedora 10, 64-bits.

Step 2. Converted the RPM file (spideroak_fc64.rpm) to a tar.gz using the rpm2targz command (which is installed in Slackware as part of the A series). You can also use a DEB file if you would like to convert it by hand with cpio or automatically with alien (however you’ll need to install alien as it is not part of the base Slackware install).

Step 3. Made a temporary directory. Inside that directory I decompressed the resulting file (spideroak_fc64.tar.gz). It contained the full path for SpiderOak files.

Step 4. Copied the etc/spideroak directory to /etc. Copied the content of the usr/bin and usr/lib to /usr/bin and /usr/lib. Dismissed the content of the usr/share directory.

Step 5. Because this is a headless server and it doesn’t have X installed. However, SpiderOak client requires some X libraries, so I had to download and install some Slackware X libraries just to run SpiderOak (I downloaded them directly from a Slackware mirror [3] and installed using pkgtool):

Step 6. Then followed the installation directions in the SpiderOak website [4] to install in a headless server. In the new device form I entered the username and device name (and ID for the server). The webpage then created a newusersetup.js file I downloaded.

Step 7. Edited the newusersetup.js to add it the SpiderOak password.

Step 8. Ran SpiderOak with:

SpiderOak --bootstrap=newusersetup.js

This step may take several minutes while SpiderOak connects to the server and download the information about other devices in your backup (if you have any). In my case took around 14 minutes.

The first time I did this step, I thought the SpiderOak process had hanged, so I killed it. That was a mistake, as after that SpiderOak refused to do anything and when I executed it as SpiderOak --userinfo, it kept saying “NOTE: This installation is in the process of being reinstalled or repaired”. (Calling SpiderOak --repair didn’t fixed this, by the way.) The logs in the .SpiderOak directory ended with a message like: “ERROR main Reinstall can be run in normal execution mode only”, which hinted that I need to run SpiderOak in GUI mode, which was not possible in this server. My workaround was removing the .SpiderOak directory, and then adding a new device. I could not reuse the first device name I used, so I had to use a new one.

Step 9. Then I selected my data directory (which is what I share using Samba and SSHFS to work in my workstation) with:

SpiderOak --include-dir=/home/mvaldez/SHARE

Step 10. Then excluded some directories:

SpiderOak --exclude-dir=/home/mvaldez/SHARE/DOWNLOADS
SpiderOak --exclude-dir=/home/mvaldez/SHARE/Recycled
SpiderOak --force --exclude-dir=/home/mvaldez/SHARE/.Trash-1000
SpiderOak --force --exclude-dir=/home/mvaldez/SHARE/.Trash-1001

Step 11. Done!

Useful command line sentences:

SpiderOak --selection

List the selected file set to backup

SpiderOak --space

Display the space usage for your backup account

SpiderOak --tree | less

Display the full list of files to be backed up

SpiderOak --userinfo

Show some basic information about your account and backed up computers

SpiderOak --billing

Display an URL to pay (because the only alternative is using the GUI interface)

SpiderOak --batchmode --verbose

Runs the backup process and exits when done

SpiderOak --headless --verbose

Runs the backup process and stay running

Lines to add to your /etc/rc.d/rc.local script (or similar) to run SpiderOak at boot up:

echo " * SpiderOak remote backup."
su -c "screen -d -m /usr/bin/SpiderOak --headless --verbose"

Then you can see what is doing by running:

screen  -D -R

Or you can check the SpiderOak logs in the .SpiderOak directory.