Friday, October 1, 2010

ZFS Replication. Useful links

ZFS Replication
link
Understanding ZFS: Replication, Archive and Backup
link

Friday, September 24, 2010

bash config to use arrows to scroll history

Insert into .bashrc to turn on using arrows up/down to search in bash history.
 
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
shopt -s cdspell
shopt -s cmdhist
shopt -s histappend
export HISTCONTROL="ignoredups" 
 
very useful ;-) 

Wednesday, November 18, 2009

Network backup with NC and TAR

Backup to another host through NetCat command. It can be useful if there is no space for local backup or just for file transfer between hosts.

nc -l -p 8081 >/tmp/nc.dump #just listen on port 8081 and rewrite to stdout

then send something in raw to remote host:

tar c /opt/music | nc -w 2 HOST 8081
cat /tmp/mp3.file | nc -w 2 HOST 8081

-w 2 - wait silence for 2 seconds at stdin of NC and exit
.