dumpvacroots 467 B

1234567891011121314
  1. #!/bin/rc
  2. # this dumps all the vac scores ever stored to the venti server
  3. # if nothing else, this illustrates that you have to control access
  4. # to the physical disks storing the archive!
  5. ventihttp=your-server:8000
  6. hget http://$ventihttp/index |
  7. awk '
  8. /^index=/ { blockSize=0+substr($3, 11); }
  9. /^arena=/ { arena=substr($1, 7); }
  10. /^ arena=/ { start=0+substr($5, 2)-blockSize; printf("./8.printarena -o %d %s\n", start, $3); }' |
  11. rc |
  12. sed -n 's/^(.*) 1$/vac:\1/p'