On Wed, Mar 05, 2014 at 21:20:56 -0500, Michael Stauffer wrote:
> Yes, thanks I was trying to avoid that since it will take a long time.
> Although...if I start the dump with --no-taper, is there a file that's
> written with at the begin of the process with all the files to be dumped? I
> assume the index itself is written at the end?

No, the list of files backed up isn't generated before the dumping
actually happens.

As Brian mentioned, the index file is actually extracted by piping the
generated dump file (i.e. tar archive) through a separate "tar --list"
process (while it's being genertated, at the same time it's being
written to the holding disk by yet another process), so Amanda can be
sure that the index file shows exactly what's found in the archive. 
(You can see this happening by looking at the process list while Amanda
is running; you'll also see a "sed" process running to strip the leading
"./" off each line of the index file.)

One can ask tar to list the files as they are backed up... but even that
list is printed as the files go along, rather than at the beginning of
the run or whatever.


However, if you decide it's worth spending lots of your own time trying
to get these file lists without running the full dump, its worth noting
that GNU tar notices when the --file target is /dev/null, and in that
case it goes through all the steps to determine the data files to
include in the archive, but since knows the output will be discarded it
doesn't actually bother to copy the contents of those files off the disk
(and thus it runs much faster than an actual backup).

Amanda uses this fact in the estimate phase to have tar calculate the
size of each level of backup (when "estimate" mode is set to "client",
anyway)... but it only uses the total size calculated, without
generating a list of the files that were included in the (virtual) dump.

However, you should be able to search the log files in
/var/log/amanda/client/[CONFIG] for "/dev/null" to find the tar commands
that amamanda is using.  On my system, they look like 
  amgtar: Spawning "/bin/tar /bin/tar --create --file /dev/null --directory / 
--one-file-system --atime-preserve=system --no-check-device 
--listed-incremental /var/lib/amanda/gnutar-lists/[CONFIG]/[hostname]__0.new 
--sparse --ignore-failed-read --totals --exclude-from 
/tmp/amanda/amgtar._.20140306003007.exclude ." in pipeline

You'd then need to make your own copies of the appropriate
"gnutar-lists" file (so that you don't overwrite the existing file
during your test), then add the "--verbose" option to the command and
kick it off.... and the result should be a list of files (sent to
stdout) that would be backed up for that DLE, without actually creating
any dumps or copying any actual file data.

Hope that helps....

                                                        Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  [email protected]  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Reply via email to