Results 1 to 4 of 4

Thread: Source code that actually opens file to get fd

  1. #1

    Unhappy Source code that actually opens file to get fd

    Hello,

    I'm trying to modify Amanda to my needs.
    One of the functionalities that I would like to add is to output the tape label (from amlabel) and list of files written to the tape.
    I figured if I output the files that are being opened to be written to the tape drive, I could get the behaviour that I need.
    I tried reading through the source code itself in conjunction with official Amanda document and its wiki but more I read the poor documentation and poorly documented code, the more i was getting lost.

    So does anyone know where amanda actually does the fd = open (filename)?
    Any help or insight would be greatly appreciated.

    Thank you.

  2. #2
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    688

    Default

    Which filename are you looking for, exactly? The files being backed up? There's a long, long path you're trying to trace. The outline looks something like

    files -> GNU Tar -> Amanda client -> network -> Amanda server -> Holding -> Taper -> Tape

    You may want to look into amreport's PS output options, though -- they give a nice one-page overview of the dumpfiles (not original backed-up-files) put on a given tape.
    Storage Software Engineer
    Zmanda, Inc.

  3. #3

    Default

    I am looking for the files that are being Tar'ed to put onto a specific tape.
    So I guess I need to find the code where amanda executes GNU tar? It must specify to GNU tar which files it wants to dump right?

    And yes, I am currently looking into amreport's PS output options. THank you so much for the suggestion!



    Edit: I actually found that in amanda's log directory, there is index information(i.e. /var/lib/amanda/setup01/index/). I think it's because I flagged "index yes" in amanda.conf.
    My question is that if the index file (in gz form) is going to be generated for every tape in tape library environment... If so, this file is exactly what I need.

    This is how the file looks.
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------
    /
    /temp/
    /temp/2007-09-16/
    /temp/2007-09-16-11:30/
    /temp/2007-09-16-11:48/
    /temp/2007-09-16-11:50/
    /temp/2007-09-16-12:05/
    /temp/2007-09-16-12:15/
    /temp/2007-09-16-12:25/
    /temp/2007-09-16-12:35/
    /temp/2007-09-16-12:45/
    /temp/2007-09-16-12:55/
    /temp/2007-09-16-13:05/
    /temp/2007-09-16-13:15/
    /temp/2007-09-16-13:25/
    /temp/2007-09-16-13:35/
    /temp/2007-09-16-13:45/
    /temp/2007-09-16-14:05/
    /temp/2007-09-16-14:15/
    /temp/2007-09-16-14:25/
    /temp/2007-09-16-14:35/
    /temp/2007-09-16-17:35/
    /temp/2007-09-16-17:45/
    /temp/2007-09-16-17:55/
    /temp/2007-09-16-18:05/
    /temp/2007-09-16-18:15/
    /temp/2007-09-16-18:25/
    /temp/2007-09-16-18:35/
    /temp/2007-09-16-18:45/
    /temp/2007-09-16-18:55/
    /temp/2007-09-16-19:05/
    /temp/2007-09-16-19:15/
    /temp/2007-09-16-19:25/
    /temp/2007-09-16-19:35/
    /temp/2007-09-16-19:45/
    /temp/2007-09-16-19:55/
    /temp/2007-09-16-20:05/
    /temp/2007-09-16-20:15/
    /temp/2007-09-16-20:25/
    /temp/2007-09-16-20:35/
    /temp/2007-09-16-20:45/
    /temp/2007-09-16-20:55/
    /temp/2007-09-16-21:05/
    /temp/2007-09-16-21:15/
    /temp/2007-09-16-21:25/
    /temp/2007-09-16-21:35/
    /temp/2007-09-16-21:45/
    /temp/2007-09-16-21:55/
    /temp/2007-09-16-22:05/
    /temp/2007-09-16-22:15/
    /temp/2007-09-16-22:25/
    /temp/2007-09-16-22:35/
    /temp/2007-09-16-22:45/
    /temp/2007-09-16-22:55/
    /temp/2007-09-16-23:05/
    /temp/2007-09-16-23:15/
    /temp/2007-09-16-23:25/
    /temp/2007-09-16-23:35/
    /temp/2007-09-16-23:45/
    /temp/2007-09-16-23:55/
    /temp/2007-09-17-10:01/
    /temp/2007-09-17-10:06/
    /temp/2007-09-17-10:16/
    /temp/2007-09-17-10:26/
    /temp/2007-09-17-10:36/
    /temp/2007-09-17-10:46/
    /temp/backup.sh
    /temp/dump.sh
    /temp/makedir.sh
    /temp/readme.first
    /temp/sync.sh
    /temp/2007-09-16/2006-Aston-Martin-V8-Rim-1920x1440.jpg
    /temp/2007-09-16/2007-Koenigsegg-CCX-Instrument-Cluster-1920x1440.jpg
    /temp/2007-09-16/2007-Koenigsegg-CCXR-Logo-on-Carbon-Fiber-1280x960.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Dashboard-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Front-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Front-And-Side-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Front-Angle-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Front-Top-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Interior-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Rear-1600x1200.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Rear-And-Side-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Rear-Angle-Top-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Rear-Section-Low-View-1600x1200.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Seating-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Side-1920x1440.jpg
    /temp/2007-09-16/2008-Lamborghini-Reventon-Wheel-1600x1200.jpg
    /temp/2007-09-16/backup.sh
    /temp/2007-09-16/makedir.sh
    /temp/2007-09-16/readme.first
    /temp/2007-09-16-11:30/2006-Aston-Martin-V8-Rim-1920x1440.jpg
    /temp/2007-09-16-11:30/2007-Koenigsegg-CCX-Instrument-Cluster-1920x1440.jpg
    /temp/2007-09-16-11:30/2007-Koenigsegg-CCXR-Logo-on-Carbon-Fiber-1280x960.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Dashboard-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Front-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Front-And-Side-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Front-Angle-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Front-Top-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Interior-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Rear-1600x1200.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Rear-And-Side-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Rear-Angle-Top-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Rear-Section-Low-View-1600x1200.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Seating-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Side-1920x1440.jpg
    /temp/2007-09-16-11:30/2008-Lamborghini-Reventon-Wheel-1600x1200.jpg
    /temp/2007-09-16-11:30/backup.sh
    /temp/2007-09-16-11:30/dump.sh

    .
    .
    .
    .
    .
    .

    File was 6000 lines long so it is truncated.
    -------------------------------------------------------------------------------------------------------------------------------------------------------
    Last edited by openuser; September 19th, 2007 at 07:06 AM. Reason: Add content

  4. #4
    Join Date
    Mar 2007
    Location
    Chicago, IL
    Posts
    688

    Default

    Yes -- this is exactly what you need.
    Storage Software Engineer
    Zmanda, Inc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •