2012年3月5日 星期一

SparkleShare 架設像 DropBox 的服務

http://www.arthurtoday.com/2011/12/sparkleshare-dropbox.html
http://www.arthurtoday.com/2010/09/ubuntu-add-apt-repository.html
http://www.arthurtoday.com/2012/01/ubuntu-sparkleshare-dropbox_10.html
SparkleShare 的功能主要是由三套軟體組成的,SparkleShare 本身是一個 Client 端的軟體,負責同步檔案到 Server 上,而Server 端則是使用目前最熱門的版本管理軟體 Git 來儲存檔案,然後,中間透過 OpenSSH 提供安全的檔案傳輸功能,因此,SparkleShare 是用專案的觀念來分類儲存檔案,而且,可以提供版本管理的機制,所以,一旦誤刪檔案的時候,就可以透過 Git 提供的版本管理功能來找回檔案哩 !



一、Git安裝方式
http://blog.wu-boy.com/2011/04/%E5%9C%A8-ubuntu-%E5%AE%89%E8%A3%9D%E6%88%96%E5%8D%87%E7%B4%9A-git-%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6%E7%9A%843%E7%A8%AE%E6%96%B9%E6%B3%95/
二、Ubuntu 用 SparkleShare 架設 DropBox 服務 (上)
http://www.arthurtoday.com/2012/01/ubuntu-sparkleshare-dropbox.html
三、Ubuntu 用 SparkleShare 架設 DropBox 服務 (下)
四、Ubuntu 為什麼找不到 add-apt-repository 的指令 ?






http://www.libthomas.org/~thomas/wp/?p=903

用 SparkleShare 取代 Dropbox

Dropbox 2G 的空間限制讓我決得很不方便,我的重點只是備份與同步,在兩年前Dropbox這樣的服務相當讓我滿意。去年開始發現空間不夠,他的費用又讓人倒彈,開始Dropbox+UbuntuOne的日子。去年也嘗試過 SparkleShare, 當時相當不穩,一下就葛屁了。
今天的 SparkleShare 不一樣了,剛剛把所有Dropbox上的資料移到自己的 ssh+git 空間中。一開始大量資料下cpu很高,都是 git, 之後會有一段時間跑ssh(應該是在上傳),目前感覺良好。隨後再Debian上也裝、Windows7也裝,通通搞定了。
SparkleShare linux 安裝
apt-get install sparkleshare
執行 sparkleshaere,啟動之後再角落可以看到小圖示
可以點選右鍵後”Add Hosted Project…”
會出現大視窗依序給你輸入資訊
1. 選擇 On my own server
2. 主機IP, 路徑
address eg: ssh://username@10.0.0.2
path eg: /home/username/sync
別急著按確認,以下有些步驟要先作:
1. upload key
scp "~/SharkleShare/username's key.txt" username@10.0.0.2:~/.ssh/authorized_keys
(如果已經有這個檔案 authorized_keys, 不能複製,但是可以換成authorized_keys2, authorized_keys3…以此類推)
more ssh key information:
http://www.cs.uwaterloo.ca/cscf/howto/ssh/public_key/
2. 產生 git 目錄 (Server上只需要作一次,之後新增其他同步電腦則不需要)
ssh 10.0.0.2 -l username
mkdir sync
cd sync
git --bare init
ps: 當然這個server需要先裝好 ssh and git
可以回到 SparkleShare 的 畫面按下確定,等待同步即可…
以上是剛剛剛片段記憶
一下就完成了 所以來不及抓圖…xD

partition backup without correct partition table

The real reason about PCBSD backup fail is identify incorrect bsd table from kernel. We use disktype and losetup to build a loop device and use partclone.ufs backup it. We are plain to fix this issue later…
我們之前測試過 FreeBSD9, PCBSD9 目前預設是 UFS SU+J 的 partition,
Partclone 都有支援,前提是 kernel 讀的到 “磁區”。
用 Clonezilla testing version (1.2.12-33) 可以備份還原 FreeBSD9。
但是一樣的版本無法處理PCBSD,主要是:
[ 3.785024] sda: sda1
[ 3.785026] sda1: bsd:bad subpartition – ignored
[ 3.785027] sda5 sda6 sda7 >
所以無法辨識。
目前找到以用disktype /dev/sda | grep from
Partition 1: 19.99 GiB (21466948608 bytes, 41927634 sectors from 2016)
Partition a: 1.953 GiB (2097152000 bytes, 4096000 sectors from 0)
Partition b: 1.953 GiB (2097152000 bytes, 4096000 sectors from 4096000
Partition c: 19.99 GiB (21466948608 bytes, 41927634 sectors from 0)
Partition d: 2 GiB (2147483648 bytes, 4194304 sectors from 8192000)
Partition e: 14.09 GiB (15125160960 bytes, 29541330 sectors from 12386304)
一般bsd disk layout: a 是 / (sda1), b 是 swap (sda5), c 是整顆硬碟
(sda); 之後是使用者自行新增的partition. d 是 /usr (sda6), e /var
(sda7)…以此類推
然後用 losetup -r -o $((8192000*512)) –sizelimit $((29541330*512))
/dev/loop1 /dev/sda1 (< --注意是sda1..)
製作出一個loop磁區讓partclone備份
partclone.ufs -d -c -s /dev/loop1 -o-
下禮拜如果有時間應該要修正 partprobe or kernel 的
CONFIG_BSD_DISKLABEL=y 讓 kernel 可以支援PCBSD...

沒有留言:

張貼留言

聲寶卡式濾心頭蓋

 https://www.ruten.com.tw/item/show?22027794089976 在這裡買的接頭 https://www.ruten.com.tw/item/show?21814839221595 【品名】台製優質濾心頭蓋 (適用3M、EVERPURE濾心)功...