On 24.11.2017 at 15:06 wrote [email protected]:
> Hello everyone,
> 
> I am getting the error in the subject line when running a job with a changed 
> fileset.
> 
> This is Bareos 16.2.4 running on Debian 9 "Stretch". When Stretch was 
> released, I upgraded from the existing configuration of Debian 8 "Jessie". 
> Since I am using the Debian Bareos packages, this upgraded Bareos from 14.2 
> to 16.2.4. I did not check the release notes (my mistake, I know) and did not 
> update the database scheme as I should have. I manually updated the database 
> scheme version to 2004.
> 
> I have not since had a reason to update the FileSet until yesterday. I 
> updated a FileSet and tried to run a job. The job fails with the error below:
> 
> 
> 24-Nov 08:49 backup-dir JobId 908: Error: sql_create.c:791 Create DB FileSet 
> record INSERT INTO FileSet (FileSet,MD5,CreateTime,FileSetText) VALUES 
> ('Clients','j+/9T+NcNR/U67/H5j/v6A','2017-11-24 08:49:30','FileSet {
>   Name = "Clients"
>   Include {
>     Options {
>       Signature = MD5
>       IgnoreCase = Yes
>       Drive Type = "fixed"
>     }
>     File = "C:/Users/"
>   }
> }
> 
> ') failed. ERR=ERROR:  column "filesettext" of relation "fileset" does not 
> exist
> LINE 1: INSERT INTO FileSet (FileSet,MD5,CreateTime,FileSetText) VAL...
>                                                     ^
> 
> 24-Nov 08:49 backup-dir JobId 908: Error: Could not create FileSet "Clients" 
> record. ERR=
> 
> 
> The job runs if I change the FileSet back to what it previously was.
> 
> I assume this is because 15.2 added the FileSetText column in the database. I 
> have now updated the database scheme, but the problem continues.
> 
> Also, grant_bareos_privileges gives me this error, but appears to work 
> correctly:
> 
> 
> Granting postgresql tables
> psql:/tmp/grants.sql.6698:1: ERROR:  role "bareos" already exists
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> GRANT
> Privileges for user bareos granted ON database bareos.
> 
> 
> So how can I fix this, recognizing that it probably is my fault?

Well, I don't know, how you did perform your database update. On Debian,
dbconfig should take care of this automatically (unless you disabled it).

This change has been introduced on the schema update from version 2003
to 2004 and luckily for you, it is the only change that have been made
there.

You see the change in the file
/usr/lib/bareos/scripts/ddl/updates/postgresql.2003_2004.sql:

BEGIN; -- Necessary for Bareos core

ALTER TABLE FileSet ADD COLUMN FileSetText TEXT DEFAULT '';
UPDATE Version SET VersionId = 2004;
COMMIT;

set client_min_messages = fatal;

ANALYSE;


You only need to apply the statment
ALTER TABLE FileSet ADD COLUMN FileSetText TEXT DEFAULT ''

# switch user to "bareos"
su - bareos -s /bin/bash
psql

# enter the relevant line


regards,
Jörg


-- 
 Jörg Steffens                   [email protected]
 Bareos GmbH & Co. KG            Phone: +49 221 630693-91
 http://www.bareos.com           Fax:   +49 221 630693-10

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Komplementär: Bareos Verwaltungs-GmbH
 Geschäftsführer:
 S. Dühr, M. Außendorf, Jörg Steffens, P. 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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to