scan 401 B

1234567891011121314151617
  1. #!/bin/rc
  2. rfork en
  3. fn usage {
  4. echo 'usage: replica/scan replica-name [paths]' >[1=2]
  5. exit usage
  6. }
  7. . /rc/bin/replica/defs $*
  8. need serverroot serverexclude serverproto serverdb serverlog
  9. must servermount
  10. replica/updatedb -r^$serverroot $serverexclude -p^$serverproto $serverdb >>$serverlog
  11. ndb=`{echo $serverdb | sed 's;(.*)/(.*);\1/_\2;'}
  12. replica/compactdb $serverdb >$ndb && mv $ndb $serverdb