Hello,

I would like to correct a few points that may be misconceptions for you or others:


On 08/04/2017 10:47 PM, Andras Horvai wrote:
Hi,

Thank you for your answer. I think it is not the problem... Fileset has 2 months retention period it means files are gone from the Catalog after 2 months...
The retention period of 2 months does not imply that the records are not in the catalog.  The records remain until you explicitly prune or purge or you run a job that references the FileSet.  This point is often misunderstood.
this is perfectly ok for me. But the volume has 100 years retention period and job records also
inherit this retention period,

The Job records never inherit any retention period other than their own retention period.  All the job records can be removed from the catalog even if the Volume retention is 10000 years.  They can be reconstructed from the volume using bscan, but they will be only removed from the catalog when you explicitly prune or purge or you run a that job again.

the problem is that after database restore these job records have gone from the catalog after
about 2 weeks usage of the new server or so, honestly I cannot tell you this precisely because I have not checked the presence of archive jobs in catalog.
There is absolutely nothing in restoring a database that would cause Job records to be removed.  Something else is going on.

This is how I planned the restore from archive:
I would have expected that I had the archive job records id in catalog, so using those 
I would have been able to do a full job restore (this would have perfectly worked for me).
And this would have worked if I should not had to move the catalog to another server :( since I checked with the old db andI was able to see the old archive records...
Note, if you do a restore of a Job (rather than a full database), the Job records associated with the restore that you ran will be (by default) automatically pruned, so at that moment Job records could be removed from the catalog even if the Volume retention is much larger.  This is normal and how Bacula works. 

In addition, each time Bacula automatically removes records from the catalog, there is a line printed in the job record that tells you it has done so.


I am going to double check the logs on the new server but I do not think so I would find any useful :(
If you understand what I have written above, you should be able to figure out what is happening that you do not want.

Another suggestion:  if you want to be sure at least temporarily not to lose any job records, simply turn off autoprune prior to running any job with the migrated database.  Then when you have a controlled situation with a new backup copy of your migrated database you can turn on autoprune again.  Note: autoprune is in the Client and the Pool resources and not directly in the Job resource.

Best regards,
Kern

Thanks for any help,

Andras


Virus-free. www.avast.com

On Fri, Aug 4, 2017 at 10:02 PM, Dan Langille <d...@langille.org> wrote:
> On Aug 3, 2017, at 4:44 AM, Andras Horvai <andras.hor...@gmail.com> wrote:
>
> Hi,
>
> I had to move my bacula backup server from one server to another because of hardware
> failure. I am using mysql server as my catalog backend. Before installing the new server
> I did a mysql dump on the old and then I did a mysql restore on the new.
> Seemed everything was fine. Then recently I had to restore from Archive.
>
> I have archive jobs which are copy jobs.
> I do weekly full backup to a file storage. Then these copy jobs move the last full backup from
> file storage to tape (worm) storage.
>
> The retention period of the volume of archive is 100 years. This retention
> time is inherited by the jobs. The file retention time of these jobs is 2 months. So in theory,
> when I have to restore something from archive what is 2 years old I would be able to do
> a full job restore... of that full backup which would be perfectly fine for me.... but the problem:

As I understand it, and perhaps other can correct/confirm:

 - when the first retention period is met, the data can be purged from the Catalog.

Perhaps this data has been purged from the new database server after it was copied it.  It was
there, but now it has been purged. Has the 2 month period been met since that move?

> It seemed that after the move of the backup server I lost my archive job records from the catalog.
> bacula did not find the archive jobs of the client in the catalog. I had to use bscan on the tape
> volume, so I was able to restore.
>
> Fortunately, I did not wipe the old system so I was able to run bconsole and I checked
> that the archive records are present... in the old database....
>
> Can anybody advise what to check in this case? What did I wrong?

I think you did nothing wrong.

--
Dan Langille - BSDCan / PGCon
d...@langille.org





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to