1create user bacula;
2
3-- for tables
4grant all on unsavedfiles to bacula;
5grant all on basefiles	  to bacula;
6grant all on jobmedia	  to bacula;
7grant all on file	  to bacula;
8grant all on job	  to bacula;
9grant all on media	  to bacula;
10grant all on client	  to bacula;
11grant all on pool	  to bacula;
12grant all on fileset	  to bacula;
13grant all on path	  to bacula;
14grant all on filename	  to bacula;
15grant all on counters	  to bacula;
16grant all on version	  to bacula;
17grant all on cdimages	  to bacula;
18grant all on mediatype	  to bacula;
19grant all on storage	  to bacula;
20grant all on device	  to bacula;
21grant all on status	  to bacula;
22
23-- for sequences on those tables
24
25grant select, update on filename_filenameid_seq    to bacula;
26grant select, update on path_pathid_seq 	   to bacula;
27grant select, update on fileset_filesetid_seq	   to bacula;
28grant select, update on pool_poolid_seq 	   to bacula;
29grant select, update on client_clientid_seq	   to bacula;
30grant select, update on media_mediaid_seq	   to bacula;
31grant select, update on job_jobid_seq		   to bacula;
32grant select, update on file_fileid_seq 	   to bacula;
33grant select, update on jobmedia_jobmediaid_seq    to bacula;
34grant select, update on basefiles_baseid_seq	   to bacula;
35grant select, update on storage_storageid_seq	   to bacula;
36grant select, update on mediatype_mediatypeid_seq  to bacula;
37grant select, update on device_deviceid_seq	   to bacula;
38