try-copying-up-to-n-times

try-copying-up-to-n-times is a script I wrote to facilitate recovering data from a filesystem that shows inconsistent behavior.
Download

try-copying-up-to-n-times Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Dan Stromberg
  • Publisher web site:
  • http://stromberg.dnsalias.org/~dstromberg/pypty/

try-copying-up-to-n-times Tags


try-copying-up-to-n-times Description

try-copying-up-to-n-times is a script I wrote to facilitate recovering data from a filesystem that shows inconsistent behavior. try-copying-up-to-n-times is a script I wrote to facilitate recovering data from a filesystem that shows inconsistent behavior - sometimes a file looks fine, and other times the file won't be readable, or the filesystem will even crash when you try tThe general flow of usage is: - Create and seed a database for the source directory, with -i, carefully selecting the number of reattempts you want before a file is marked "failed", aka "unrecoverable". Wait while an iteration is attempted. - Run more iterations with -r, until you've had enough. - In both of the above cases, you may want to specify -c or -C to determine some conditions under which the script will stop trying for the time being (until you rerun it).Usage:esmf04m-root> ./try-copying-up-to-n-times ./try-copying-up-to-n-times: -i, -r, -m, -g, -s and -e are mutually exclusive, and exactly one must be specifiedUsage: ./try-copying-up-to-n-times "-i databasefile repetitions" says initialize the database. Repetitions is the max number of times we will try to copy a given file"-r databasefile" says restart: continue counting down repetitions"-e databasefile" says delete a preexisting database"-d sourcehier desthier" says to copy data from sourcehier to desthier"-m databasefile repetitions filename" says to set filename's repetition count to a specific value, manually"-g database filename" says get the value for filename's repetition count"-s database" says to summarize counter status for all files in the database"-v n" says to operate verbosely. Higher n is more verbose. 1 is only for definite error conditions, 2 is surprise (non-)preexistence conditions, and 3 is for the whole ball of wax"-c shellcommand n" says to run shellcommand after attempting to copy n files. If the command returns POSIX shell false, ./try-copying-up-to-n-times will exit. Otherwise we continue"-C n" says that if %s sees n consecutive file errors, terminate prematurely-i, -r, -m and -e are mutually exclusiveOnly regular files, directories and symlinks are handled at this time. Hard links are notpreserved, their relationship will be broken silentlyThis program uses the python anydbm interface, so it may seemingly at random choose a backenddatabase like berkeley db, gdbm, dbm, dumbdbm or others. However, once a database of a givenname is created, subsequent usage of that same database name should comeup with the same type.


try-copying-up-to-n-times Related Software