Posterous theme by Cory Watilo

Filed under: SpiderOak

[Linux] SpiderOakの使い方 - how to use SpiderOak

SpierOakをheadlessで使うためにいろいろやったメモ

use MacBook(Desktop Client) and Debian(headless)

(hint: How do I install SpiderOak on a headless Linux server? )

 

))) アカウント作成 on MacBook - Sign Up on MacBook

公式サイトから直接サインアップすると2GBしかもらえないので、SpiderOakをお勧めしているブログなどのURLを探してクリックする。

 - find the web site introduce SpiderOak and click refferal link.

ex) https://spideroak.com/download/referral/6cff174dd132607bf9a774699ccd556f

完全にheadless Linuxのみで利用する場合は、How do I set up a new user from the commandline? を参考に New User Setup から作成すること。

* if you don't use desktop client (headless linux only), signup from New User Setup. refer How do I set up a new user from the commandline?.

 

))) SpiderOakのセットアップ on MacBook - setup SpiderOak on MacBook

サインアップすると自動的にダウンロードが開始されるので、インストールしてログイン - sign up, download the software, install it, and login.

 

))) SpierOak for debian のダウンロード

当初 APT sources for Linux を参考にして、リポジトリを追加してみたけど、リリースされているバージョンより古かったのでやっぱりやめに。 - because of the release version at apt is old, I got from download link.

$ wget "https://spideroak.com/directdownload?platform=ubuntulucid&arch=x86_64"
--2011-12-19 12:56:56--  https://spideroak.com/directdownload?platform=ubuntulucid&arch=x86_64
Resolving spideroak.com... 208.28.15.128
Connecting to spideroak.com|208.28.15.128|:443... connected.
ERROR: cannot verify spideroak.com's certificate, issued by `/C=US/O=GeoTrust, Inc./CN=RapidSSL CA': 
  Unable to locally verify the issuer's authority.
To connect to spideroak.com insecurely, use `--no-check-certificate'

RapidSSLダメみたいね〜。仕方がないのでエラーメッセージの通りに -no-check-certificate をつける - download again with "-no-check-certificate" option.

$ wget --no-check-certificate "https://spideroak.com/directdownload?platform=ubuntulucid&arch=x86_64"

で spideroak_9909_amd64.deb ファイルをゲット

 

))) SpiderOakのインストールに必要なモジュールをインストール - install module

$ sudo apt-get install  libdbus-1-3 dbus libxrender1

 

))) SpierOakをインストール - install SpiderOak

$ sudo dpkg -i spideroak_9909_amd64.deb

 

))) newusersetup.js の作成 - create newusersetup.js

How do I set up a new user from the commandline?

To add a device to an existing account: use the new device setup form, then edit the resulting file in a text editor (as directed in the previous paragraph), replacing the text "ENTER YOUR PASSWORD HERE" with your account password, before using the --bootstrap option.

を参考に https://spideroak.com/nus/console?newdevice=yes にアクセスし、ユーザー名とデバイス名を入力して、newusersetup.jsをダウンロード

newusersetup.js をテキストエディタ等で開いて "ENTER YOUR PASSWORD HERE" をアカウント作成時のパスワードと置換

 

))) SpiderOakのセットアップ - setup SpiderOak

$ SpiderOak --bootstrap=newusersetup.js

 

))) ターゲットディレクトリをすべてバックアップする場合 - backup entire directory

$ SpiderOak --backup=/var/backup

 

))) ターゲットディレクトリに除外するディレクトリがある場合 - backup directory without some directory

--includeでターゲットを指定 - specify directory with "--include"

$ SpiderOak --include-dir=/home/onoh

--exclude-dirで除外ディレクトリを指定 - exclude directory with "--exclude"

$ SpiderOak --exclude-dir=/home/onoh/tmp

バックアップの実行 - do backup

$ SpiderOak --batchmode

 

))) cron

$ sudo view /etc/cron.daily/spideroak
#!/bin/sh
usr/bin/spideroak --batchmode > /dev/null 2>&1
$ sudo chmod +x /etc/cron.daily/spideroak

 

))) Memo

:SpiderOakの設定ファイルやログなどは

Linux: ~/.SpiderOak
Mac: ~/Library/Application Support/SpiderOak

コピーや移動で、ディレクトリを空にすればまた新たにセットアップから始まるので、複数のアカウントに切り替えも可能

 

:syncはAとBを全く同期させるので、いったん同期が完了するとBでファイルを削除するとAにも反映される

常にAをmasterとしてBをいじったとしても反映されないといった設定はできない様子