Re: slow backup using lvm snapshots and tar
Israel Garcia wrote:
I'm using this command to create s snapshot of every LV's server,
mount the LV, make a TGZ to a shared folder (NFS), then umount LV
image and remove snapshot LV. The problem is tar backup is extremely
slow (it takes 3 hours to make backup of all servers).
This is the command I'm using:
for vps in `cat vps`; do lvcreate -L10G -s -n "$vps"snapshot
/dev/vg0/"$vps".domain-disk && mount /dev/vg0/"$vps"snapshot
/mnt/vmbackup && cd /mnt/vmbackup && nice -n 19 tar pczf
/shared/lvbackups/"$vps"_`date +%F` . && cd ; umount /mnt/vmbackup &&
lvremove -f /dev/vg0/"$vps"snapshot;done
My question is:
How can I make TAR backup faster? is it possible? Is there other
command faster than TGZ in this case?
thanks in advance.
Great fun this kind of thing...
Look at the nfs export - fiddle with the r/wsize parameters:
Enough space. Produce the tar file locally then copy to the remote
server....if security permits with ftp.
Lots of space...Do the backups in parallel. bash wait is your friend:
BTW: The p in pczf is an option for restore.