Bacula-users

Re: [Bacula-users] A reasonable way to get a list of files backed up ina job?

2008-05-06 22:32:37
Subject: Re: [Bacula-users] A reasonable way to get a list of files backed up ina job?
From: Gregory Orange <gregory.orange AT metoceanengineers DOT com>
To: Bacula-users AT lists.sourceforge DOT net
Date: Wed, 07 May 2008 10:32:18 +0800
I'm not sure if this is helpful, but you can use the console without 
actually going into the console, so to speak.

In a script or at a shell prompt:
bconsole <<EOF
list files job=nn
EOF

HTH,
Greg.


K. M. Peterson wrote:
> Hi Tom,
> 
> Thanks for your response. 
> 
> I was trying to avoid using the console - it seemed that it would be 
> cleaner if there was some way of getting this information out of the 
> verify job or if there was a parameter in the messages resource that 
> would do this.  Again, both these will give me files either not backed 
> up or not comparing to the backup, I was hoping that someone had a way 
> to get the list of files that were backed up.
> 
> What I would need to do is use llist rather than list (easier to parse, 
> less likely to change in a way to break a script), but then there's more 
> work in getting that last jobid (although this isn't an issue if the 
> script is run as a Run After Job with the right parameter).  It sure 
> does seem like there'd be a way to do this with Verify at least.  That's 
> what I was hoping for.  Cleaner to me means less likely to break, and 
> fewer things to go wrong - and I'd like to put as much of the logic as 
> possible in the conf file as opposed to, well, a hack using bconsole.
> 
> Doesn't look like this is possible.  Since I decided that I also want to 
> report on jobs on a per-volume basis, I may end up writing SQL as well...
> 
> Again, I appreciated your getting back to me...
> 
> On Sun, May 4, 2008 at 8:06 PM, Thomas Krwawecz III <tom AT bluegravity DOT 
> com 
> <mailto:tom AT bluegravity DOT com>> wrote:
> 
>     "list files jobid=nn" from bconsole isn't working?
>      
>     Thomas Krwawecz III
>     --
>     Blue Gravity Communications, Inc.
>     3495 Haddonfield Rd, Suite 6
>     Pennsauken, NJ 08109
>      
>     Toll Free: 1-877-8 HOSTING
>     Tel: (856) 662-9100, Fax: (856) 662-9101
>     Web: http://www.bluegravity.com
> 
>         ----- Original Message -----
>         *From:* K. M. Peterson <mailto:kmp.lists+bacula-users AT gmail DOT 
> com>
>         *To:* Bacula-users AT lists.sourceforge DOT net
>         <mailto:Bacula-users AT lists.sourceforge DOT net>
>         *Sent:* Sunday, May 04, 2008 5:11 PM
>         *Subject:* [Bacula-users] A reasonable way to get a list of
>         files backed up ina job?
> 
>         Hi all,
> 
>         We're migrating to Bacula from a fairly random system of
>         backups, many of which used tar jobs being run on servers and
>         then copying them to a "backup machine" (via NFS) where they
>         were manually migrated to another medium.  (You don't want to
>         hear what that other medium is...)
> 
>         To move this migration along, I'd like to have a way to
>         determine the files that were backed up in job, so that I can
>         delete them.  This way, I could migrate these tar files over to
>         our bacula machine, and then delete them once I know they are on
>         tape.  Generally, the names are date-tagged in some way, but
>         this isn't something that I want to rely on (in case the copy
>         process gets hosed, and there are 'old' files that actually
>         haven't been copied by Bacula).
> 
>         If there were some reasonable way to get a list from Bacula of
>         the files in a particular job, that would help.  I see that I
>         can run a Verify job (say, type DiskToCatalog) and get a list of
>         the files that have changed or otherwise differ from the state
>         of those on the backup set, or I can get a list of files that
>         were /not/ saved or encountered errors using parameters in a
>         message resource ("skipped" or "notsaved" types) in a particular
>         backup job.  This is the converse of what I'd like to have.
> 
>         There doesn't seem to be a way to determine in this way what
>         files /were/ backed up, or haven't been changed since a backup
>         was made.
> 
>         What I'm doing now is creating a sentinel file in the
>         RunBeforeJob and then deleting all files "older" than this on
>         successful completion (in a RunAfterJob) script.  This works,
>         but it's not something that I'm particularly comfortable with -
>         I can't think of how it might get screwed up, but I'd rather
>         again have a positive state to check rather than the lack of a
>         negative state.  And, I presume that I could write an SQL query
>         of some sort and query the database - perhaps through a script
>         talking to bconsole - but that strikes me as again not really
>         plain enough for whomever takes over management of this task
>         from me when I'm done with it.
> 
>         Is there something that I'm missing here, either in my general
>         approach or in how the particular code in the daemons is
>         implemented?  I'm running 2.2.8 on OpenSUSE 10.2 with MySQL.
> 
>         Thanks!
>         _KMP
>         Boston
> 
>         
> ------------------------------------------------------------------------
> 
>         
> -------------------------------------------------------------------------
>         This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>         Don't miss this year's exciting event. There's still time to
>         save $100.
>         Use priority code J8TL2D2.
>         
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
> 
>         
> ------------------------------------------------------------------------
> 
>         _______________________________________________
>         Bacula-users mailing list
>         Bacula-users AT lists.sourceforge DOT net
>         <mailto:Bacula-users AT lists.sourceforge DOT net>
>         https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> 
>     -------------------------------------------------------------------------
>     This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>     Don't miss this year's exciting event. There's still time to save $100.
>     Use priority code J8TL2D2.
>     
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>     _______________________________________________
>     Bacula-users mailing list
>     Bacula-users AT lists.sourceforge DOT net
>     <mailto:Bacula-users AT lists.sourceforge DOT net>
>     https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users


-- 
    - ---- -----
      Gregory Orange             Phone: +61 8 9387 7955
     System Administator            Fax: +61 8 9387 6686
    RPS MetOcean                        http://www.rpsmetocean.com.au
   System Administrators Guild of Australia  http://www.sage-au.org.au
- ---- -----

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users