18 · 01

FreeBSD on the ASUS Eee Box using an USB flash drive

I wanted my personal server to be closer to me. So I invested few days ago in the Asus Eee Box, thinking it is the best configuration for a light server at home.

I moved this blog and all my services from my dedicated server to my new one.

To setup FreeBSD on this kind of machine, you have two ways to do it:


Creating a bootable USB flash drive by using the original ISO image is a bit annoying if you haven't got a FreeBSD station yet. I have been using the fbsd2img.sh script,

I share my USB flash drive image: 7.1-RELEASE-i386-bootonly.img.
To setup the USB flash drive, use "dd" (/dev/XXX is the device of your USB flash drive):

dd if=7.1-RELEASE-i386-bootonly.img of=/dev/XXX bs=1m


Here is the result of the server hosting this blog :)

24 · 01

Duplicity: simple, efficient and secure backup solution for Unix

Backuping data is a real problem. Investing 2 RAID 1 harddrives is a little expensive for a workstation. Duplicity is able to do incremental backups with the rsync algorithm. All backuped data are encrypted with gpg. All duplicity options are available on the official website. I wrote a small script for automate backup on my workstation. backup.sh:
#!/bin/sh
ROOT="/root/backup"
DISTANT="ssh://user@zaphod.eu//home/user"
PASSPHRASE="xxxxxxxxxxxx"
KEEP_ARCHIVE="2M" # 2 Months
FILELIST="files.lst"
export PASSPHRASE
duplicity       --include-globbing-filelist "${ROOT}/${FILELIST}" \
--exclude '**' \
--full-if-older-than "${KEEP_ARCHIVE}" / "${DISTANT}"
duplicity remove-older-than ${KEEP_ARCHIVE} ${DISTANT}
Then a small file list specifies what has to be backuped or not.
files.lst:
- /home/shad/p0rn
- /home/shad/tmp
+ /etc
+ /home/shad
According to duplicity documentation, a line beginning with a '+' specify a directory or a file to include and '-' for exclude. Be aware of list order.
It remains to add a cron entry for a weekly schedule:
0 0 * * 1 backup.sh | mail -s "Backup Report" root@zaphod.eu
Now your worksation is secured, you can restore any files to any date within the backup delay.

Pages