--- trunk/vz-clone.pl 2007/10/04 16:58:01 23 +++ trunk/vz-clone.pl 2007/10/04 18:54:41 24 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Shell qw/rsync vzlist lvcreate mount umount lvremove which ssync lvdisplay mke2fs/; +use Shell qw/rsync vzlist lvcreate mount umount lvremove which lvdisplay mke2fs/; my $vz = '/vz'; my $conf = '/etc/vz/conf'; @@ -44,13 +44,8 @@ sub copy_files { my ( $from, $to ) = @_; - if ( which('ssync') ) { - warn "ssync $from -> $to\n"; - ssync(qw{--log-mode file --log-path /dev/null},'-f',$from,'-t',$to); - } else { - warn "rsync $from -> $to\n"; - rsync('-ra', "$from/", "$to/" ); - } + warn "rsync $from -> $to\n"; + rsync('-raSHAD', "$from/", "$to/" ); } if ( $vz_lv ) { @@ -109,7 +104,7 @@ print "Cleanup\n"; - umount( "$vz_lv_path/$clone" ); + #umount( "$vz_lv_path/$clone" ); umount( "$vz_lv_path/$snap" ); lvremove( '-f', "$vz_lv_path/$snap" );