Показаны сообщения с ярлыком backup. Показать все сообщения
Показаны сообщения с ярлыком backup. Показать все сообщения

суббота, 30 апреля 2011 г.

параллельный ssh

split -b 500m big.tgz big.tgz-part-

for i in `ls *-part-*`; do (sleep 3; scp -P 22 -i /root/.ssh/id_rsa $i root@target:/backup/ &); done
#or
for i in `ls *-part-*`; do (sleep 3; rsync -a --rsh "ssh -p 22 -i /root/.ssh/id_rsa" $i root@target:/backup/ &); done

понедельник, 5 июля 2010 г.

backup by tar

http://wiki.openvz.org/Physical_to_container


Tar

Another approach is using tar and excluding some dirs, you could do it like this:
Create a file /tmp/excludes.excl with these contents:
 
.bash_history
/dev/*
/mnt/*
/tmp/*
/proc/*
/sys/*
/usr/src/*

Then create the tar. But remember, when the system is 'not' using udev, you have to look into /proc/ after creating your container because some devices might not exist. (/dev/ptmx or others)

# tar --numeric-owner -cjpf /tmp/mysystem.tar.bz2 / -X /tmp/excludes.excl

Naturally, you can only do this when the critical services (MySQL, apache, ..) are stopped and your /tmp filesystem is big enough to contain your tar.