cpdup /pfs

Pierre Abbat phma at phma.optus.nu
Thu Jun 16 06:25:40 PDT 2011


I'm copying the desktop hard disk to the laptop hard disk. They have slightly 
different assignments of PFSes; on the laptop /home and /crypt are in the 
encrypted partition, whereas on the desktop only /crypt is. The shell script 
is
---
#!/usr/pkg/bin/bash
SRC=
DST=/mnt
FS="/usr/obj / /boot /var /tmp /usr /home /var/crash /var/tmp"

function copy
{ cpdup -d $SRC/$1 $DST/$2
  hammer config $SRC/$1 >/tmp/config.$$
  hammer config $DST/$2 /tmp/config.$$
  }

for fs in $FS
do
  copy $fs $fs
done
---
I ran it and got this near the end (there's not much in /var/crash 
or /var/tmp):
---
Scanning //home/phma/.vidalia ...
Scanning //home/phma/.mcop ...
Scanning //home/phma/.mcop/trader-cache ...
remove /mnt//home/pfs/crypt (Yes/No) [No]? n
remove /mnt//home/pfs (Yes/No) [No]? n
Scanning //var/crash ...
---
What should cpdup do with pfs directories or symlinks?

Pierre
-- 
Don't buy a French car in Holland. It may be a citroen.





More information about the Users mailing list