Discussion:
Indexing a dump file
George Mitchell
2018-05-27 16:36:55 UTC
Permalink
I'm drowning in old dump files and I would like to index them.
"restore -t" gives me a list of all the files in a dump, but I would
like to get the date of last modification and the size of each as well.
Is there something short of just doing a "restore" and "ls -lR" that
would get me the information? -- George

P.S. A hash of each file would be icing on the cake, but I don't
expect I could do that without doing a full restore.
Rodney W. Grimes
2018-05-27 18:42:20 UTC
Permalink
Post by George Mitchell
I'm drowning in old dump files and I would like to index them.
"restore -t" gives me a list of all the files in a dump, but I would
like to get the date of last modification and the size of each as well.
Is there something short of just doing a "restore" and "ls -lR" that
would get me the information? -- George
P.S. A hash of each file would be icing on the cake, but I don't
expect I could do that without doing a full restore.
A hacking of restore(8) sources would not be difficult to add
some of this. Though you are gong to need to build the symtab
as if you was doing a restore, you would not need to write the
data to disk.
--
Rod Grimes ***@freebsd.org
Peter Jeremy
2018-05-27 22:25:30 UTC
Permalink
Post by George Mitchell
I'm drowning in old dump files and I would like to index them.
"restore -t" gives me a list of all the files in a dump, but I would
like to get the date of last modification and the size of each as well.
Is there something short of just doing a "restore" and "ls -lR" that
would get me the information? -- George
I'll second the suggestion of hacking restore to DWYW. Note that all
the file metadata is at the beginning of the dump so this doesn't require
reading the entire dump. Unfortunately, the dump format is not documented
in a man page so you will need to UTSL.
Post by George Mitchell
P.S. A hash of each file would be icing on the cake, but I don't
expect I could do that without doing a full restore.
You would need to read the entire dump but you don't need to restore it -
it would be fairly easy to generate file hashes directly from the data in
the dump.
--
Peter Jeremy
Continue reading on narkive:
Loading...