Hi Andreas,

Thank you so much for your answer. I first have to check a little bit and 
will analyse what is the best way to get working my system without problems 
in the future.
I think I will try this if I really can't repair the database.

Kind regards,
Birgit

Andreas Rogge schrieb am Donnerstag, 10. Juli 2025 um 12:24:52 UTC+2:

> Hi Birgit,
>
> Am 10.07.25 um 10:36 schrieb 'Birgit Ducarroz' via bareos-users:
> > When I start my old bareos version with the old database, all works 
> > fine: i can backup, restore etc., so it seems that all these duplicates 
> > do not interfere anywhere.
>
> this indeed looks like a problem with the database itself.
> AFAICT this could only happen if there are duplicates in that primary 
> key column - which would indicate a corrupted database.
>
> However, the fileid column isn't really critical unless you use BVFS.
>
> What you could try if you still have the original database is to
> pg_dump --schema-only
> and
> pg_dump --data-only
>
> This way you get seperate dumps for the database structure and the data. 
> When you then restore the schema first, you can drop the primary key 
> before restoring the data.
>
> In the end you will have the same corruption in your restored database 
> that you had in the original one.
>
> > I can play around with the sql file, no problem of data loss since I 
> > have backuped my installaton. So every suggestion is appreciated.
> You can just remove the line adding the primary key. Most of Bareos will 
> work fine without that primary key, even though BVFS and a few other 
> things will not like it.
>
> > My question is, how can I clean my database correctly from these 
> > duplicates and finally import my dump into the new psql 16?
>
> That's a question for the PostgreSQL mailing list, as your PostgreSQL 12 
> database should not have these duplicates in the first place.
>
> Hope that helps!
>
> Best Regards,
> Andreas
>
>
> -- 
> Andreas Rogge [email protected]
> Bareos GmbH & Co. KG Phone: +49 221-630693-86 <+49%20221%2063069386>
> http://www.bareos.com
>
> Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
> Komplementär: Bareos Verwaltungs-GmbH
> Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/bareos-users/fa30cdde-dc97-4a64-9929-0b39a8a6b7a2n%40googlegroups.com.

Reply via email to