View Issue Details

IDProjectCategoryView StatusLast Update
0001520bareos-corefile daemonpublic2023-09-12 16:15
Reportervsa16 Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
OSUbuntuOS Version22.04 
Product Version22.0.2 
Summary0001520: PostgreSQL-PITR plugin bug
DescriptionThe plugin sometimes fails to perform a full backup job. As far as I have figured out, the problem is exception handling in
bareos/core/src/plugins/filed/python/pyfiles/BareosFdPluginLocalFilesBaseclass.py line 104
Steps To ReproduceDuring full backup, force Postgres to delete files from its data directory
Additional InformationSuspected job logs:
vm-postgres-14 JobId 56: Fatal error: bareosfd: Traceback (most recent call last):
File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 42, in start_backup_file
return bareos_fd_plugin_object.start_backup_file(savepkt)
File "/usr/lib/bareos/plugins/BareosFdPluginPostgres.py", line 396, in start_backup_file
return super(BareosFdPluginPostgres, self).start_backup_file(savepkt)
File "/usr/lib/bareos/plugins/BareosFdPluginLocalFilesBaseclass.py", line 118, in start_backup_file
mystatp.st_mode = statp.st_mode
UnboundLocalError: local variable 'statp' referenced before assignment
vm-postgres-14 JobId 56: Error: python3-fd-mod: Could net get stat-info for file /var/lib/postgresql/14/main/base/16394/1682658_fsm: "[Errno 2] No such file or directory: '/var/lib/postgresql/14/main/base/16394/1682658_fsm'"
 
TagsNo tags attached.

Activities

bruno-at-bareos

bruno-at-bareos

2023-06-26 10:19

manager   ~0005095

the real problem is the fact that the file access is denied (missing file, other troubles?)

Could net get stat-info for file /var/lib/postgresql/14/main/base/16394/1682658_fsm: "[Errno 2] No such file or directory: '/var/lib/postgresql/14/main/base/16394/1682658_fsm'

Did you already do a vacuum full on this base/cluster to check if any filesystem or disk appear ?
vsa16

vsa16

2023-06-26 11:23

reporter   ~0005096

Yes, files are deleted by the database. In my case, the reason why this happens is that the table to which these files belong was dropped after the start of the backup. Perhaps, in such a situation, it would be better to continue performing backup rather than fail with an error.
bruno-at-bareos

bruno-at-bareos

2023-06-26 11:47

manager   ~0005097

Thanks make sense. Emit a warning like in normal backup would be the right action.
bruno-at-bareos

bruno-at-bareos

2023-06-26 11:48

manager   ~0005098

The plugin should emit a warning about the missing file, not an error.
The warning should appear into the joblog similar to what happen to normal file backup.
bruno-at-bareos

bruno-at-bareos

2023-09-12 16:15

manager   ~0005417

Fixed in new incoming plugin postgresql
See PR1541 in github.

Issue History

Date Modified Username Field Change
2023-03-04 16:14 vsa16 New Issue
2023-06-26 10:19 bruno-at-bareos Assigned To => bruno-at-bareos
2023-06-26 10:19 bruno-at-bareos Status new => feedback
2023-06-26 10:19 bruno-at-bareos Note Added: 0005095
2023-06-26 11:23 vsa16 Note Added: 0005096
2023-06-26 11:23 vsa16 Status feedback => assigned
2023-06-26 11:47 bruno-at-bareos Note Added: 0005097
2023-06-26 11:48 bruno-at-bareos Status assigned => acknowledged
2023-06-26 11:48 bruno-at-bareos Note Added: 0005098
2023-09-12 16:15 bruno-at-bareos Status acknowledged => closed
2023-09-12 16:15 bruno-at-bareos Resolution open => fixed
2023-09-12 16:15 bruno-at-bareos Note Added: 0005417