Bacula-users

Re: [Bacula-users] Restoring old file -> Filling DBwith FileRecordsusing bscan

2011-02-03 10:43:38
Subject: Re: [Bacula-users] Restoring old file -> Filling DBwith FileRecordsusing bscan
From: "Richard Marnau" <marnau AT catering-kiel DOT de>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 3 Feb 2011 16:40:58 +0100
> On Thu, Feb 03, 2011 at 03:52:15PM +0100, Richard Marnau wrote:
> > > On Thu, Feb 03, 2011 at 03:21:35PM +0100, Richard Marnau wrote:
> > > > > >>>>> On Wed, 2 Feb 2011 16:13:49 +0100, Richard Marnau said:
> > > > > >
> > > > > > 2. ========= Bscan the related archives ===========
> > > > > >
> > > > > > bscan -p -s -v -P xxxx -h localhost Backupserver -V
> > > > > Vol0039\|Vol0045\|Vol0094
> > > > > >
> > > > > > Records would have been added or updated in the catalog:
> > > > > >       3 Media
> > > > > >       3 Pool
> > > > > >      54 Job
> > > > > >  352620 File
> > > > > > root@mond:~# bconsole
> > > > > > Connecting to Director localhost:9101
> > > > > >
> > > > > > =========== But still I cannot browse the files on the
> volume...
> > > > > >
> > > > > > "For one or more of the JobIds selected, no files were found,
> > > > > > so file selection is not possible. Most likely your retention
> > > policy
> > > > > pruned the files."
> > > > >
> > > > > It could be this bug:
> > > > >
> > > > > http://www.mail-archive.com/bacula-
> > > > > users AT lists.sourceforge DOT net/msg44944.html
> > > > >
> > > >
> > > > Martin, thanks for the hint. I will check that ..
> > > >
> > > > > > ============== Could it be related to the following output?
> > > > > >
> > > > > > bscan: bscan.c:637 End of all Volumes. VolFiles=10
> VolBlocks=0
> > > > > VolBytes=44,246,214,007
> > > > > > 02-Feb 15:27 bscan JobId 0: Error: 47 block read errors not
> > > printed.
> > > > >
> > > > > That might cause a few missing files, but the majority should
> be
> > > > > available.
> > > > > Are these tape or disk volumes?
> > > >
> > > > Disk Volumes on an smb share (software raid1).
> > > > I already checked the harddrives, but they seems to be fine.
> > > >
> > > > Something is very odd with my database. I walk through yesterday
> > > backups but not even 1 week old volumes.
> > > >
> > > > =======
> > > > Select the Client (1-25): 18
> > > > Automatically selected FileSet: FullWindows
> > > > +-------+-------+----------+----------------+--------------------
> -+--
> > > -----------+
> > > > | JobId | Level | JobFiles | JobBytes       | StartTime
> |
> > > VolumeName  |
> > > > +-------+-------+----------+----------------+--------------------
> -+--
> > > -----------+
> > > > | 1,631 | F     |  232,077 | 63,158,041,709 | 2011-01-03 00:46:38
> |
> > > Yearly0887  |
> > > > | 1,631 | F     |  232,077 | 63,158,041,709 | 2011-01-03 00:46:38
> |
> > > Yearly0898  |
> > > > | 1,915 | D     |   12,237 |  5,763,031,019 | 2011-01-31 00:11:23
> |
> > > Monthly0901 |
> > > > +-------+-------+----------+----------------+--------------------
> -+--
> > > -----------+
> > > > You have selected the following JobIds: 1631,1915
> > > >
> > > > Building directory tree for JobId(s) 1631,1915 ...  ++
> > > > --
> > > >
> > > > For one or more of the JobIds selected, no files were found,
> > > > so file selection is not possible.
> > > > Most likely your retention policy pruned the files.
> > > >
> > > > =======
> > > > I did now setup a new bacula server and try rebuild the database
> > > using bscan.
> > > > It's a good exercise anyway, but I really need to fix and
> understand
> > > the main problem.
> > > > There is nothing worse than a unreliable backup system.
> > >
> > > What have you got set for 'File retention'?
> >
> > >From the pool:
> >
> >   Volume Retention = 370 days         # one year
> >   File Retention = 370 days           # one year
> >   Job Retention = 370 days            # one year
> >
> > >From bconsole:
> >
> > Pool: YearlyRotation
> > +---------+------------+-----------+---------+----------------+------
> ----+--------------+---------+------+-----------+-----------+----------
> -----------+
> > | MediaId | VolumeName | VolStatus | Enabled | VolBytes       |
> VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType |
> LastWritten         |
> > +---------+------------+-----------+---------+----------------+------
> ----+--------------+---------+------+-----------+-----------+----------
> -----------+
> > |     865 | Vol0865    | Used      |       1 |    509,904,466 |
> 0 |   11,232,000 |       0 |    0 |         0 | File      | 2010-11-03
> 23:50:40 |
> > |     887 | Yearly0887 | Full      |       1 | 53,687,038,081 |
> 12 |   31,968,000 |       1 |    0 |         0 | File      | 2011-01-03
> 03:18:35 |
> > |     894 | Yearly0894 | Full      |       1 | 53,687,043,318 |
> 12 |   31,968,000 |       1 |    0 |         0 | File      | 2010-12-06
> 02:06:16 |
> > |     895 | Yearly0895 | Full      |       1 | 53,687,032,874 |
> 12 |   31,968,000 |       1 |    0 |         0 | File      | 2011-01-03
> 00:39:27 |
> > |     898 | Yearly0898 | Append    |       1 | 23,144,111,901 |
> 5 |   31,968,000 |       1 |    0 |         0 | File      | 2011-01-29
> 02:50:53 |
> > +---------+------------+-----------+---------+----------------+------
> ----+--------------+---------+------+-----------+-----------+----------
> -----------+
> >
> > >From the Job:
> >
> > 03-Jan 03:53 mond-dir JobId 1631: Begin pruning Jobs older than 1
> year 5 days .
> > 03-Jan 03:53 mond-dir JobId 1631: No Jobs found to prune.
> > 03-Jan 03:53 mond-dir JobId 1631: Begin pruning Jobs.
> > 03-Jan 03:53 mond-dir JobId 1631: No Files found to prune.
> > 03-Jan 03:53 mond-dir JobId 1631: End auto prune.
> >
> >
> > ... that's what I don't get. I proberly miss something but where is
> the file index gone ?!?!
> 
> Do the file retentions look correct in the mysql database?
> What do you get in the Retention columns if you do this command in
> mysql?
> 
> select * from Client;
> 


|        4 | maximum-fd             | 5.0.2 (28Apr10) Linux,Cross-compile,Win32 
           |         1 |     5,184,000 |   15,552,000 |

Good one! The results are interesting ..
For some reason all clients do have the same file and job retention set.




------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users