From: Daniel B. <da...@fi...> - 2007-09-29 10:41:33
|
Le Fri, 28 Sep 2007 20:00:49 -0600, Ben Nickell <twi...@ph...> a =C3=A9crit : > I have set up my new backuppc filesystem on an LVM volume and decided > on using ext3 for the filesytem. The old filesytem is reiserfs. > I would like to copy the old filesystem to the new larger volume. > The backuppc FAQ states: >=20 > The best way to copy a pool file system, if possible, is by > copying the raw device at the block level (eg: using dd). Application > level programs that understand hardlinks include the GNU cp program > with the -a option and rsync -H. However, the large number of > hardlinks in the pool will make the memory usage large and the copy > very slow. Don't forget to stop BackupPC while the copy runs. >=20 >=20 > At the risk of exposing my ignorance, If I use dd won't it copy=20 > filesystem information as well? Maybe I'm just tired and not > thinking clearly. but would something like this work? >=20 > dd if=3D/var/mapper/vg-reiserfs_volume > of=3D/var/mapper/vg-larger_ext3volume >=20 > I know that rsync would take a really long time. (about 1.1tb of > data, with all the hardlinks) Should I just try cp -a? >=20 > Any other suggestions? >=20 > Thanks, > Ben To move the pool, I use rsync to transfert everything excluding the directory "pc" (which contains all the hard links, so the others directory can be transfered with rsync -avP or something like that). Then I use the script BackupPC_tarPCCopy which is part of BackupPC 3.0. This script write a raw tar archive on the standard output which contains all the pc directory (or just a part, depending on what you want). I just pipe this output in another tar command which will extract on the fly to the destination I want. It will give something like that: BackupPC_tarPCCopy /path/to/data/dir/pc | (cd /destination/pc && tar xPf -) It's not very fast, but it works. ANd you can also use something like that to send the pool to a remote host: you just have to pipe the output of BackupPC_tarPCCopy to ssh like this: BackupPC_tarPCCopy /path/to/data/dir/pc | ssh remoteuser@remotehost "(cd /d= estination/pc && tar xPf -)" You can also compress on-the-fly the archive: BackupPC_tarPCCopy /path/to/data/dir/pc | gzip -c | ssh remoteuser@remoteho= st "(cd /destination/pc && tar xzPf -)" But for a 1.1 TB, I'm not sure how many time it will take. Cheers, daniel |