View Issue Details

IDProjectCategoryView StatusLast Update
0001056bareos-coredocumentationpublic2019-12-12 13:28
ReporterOwei Assigned Toarogge  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSCentOSOS Version7
Product Version17.2.4 
Summary0001056: NDMP restore on 16.2.5 and above does not fill NDMP environment correctly
DescriptionHi,

We recently upgraded our Bareos 16.2.4 installation to 17.2.4. Since then we can no longer restore our backups. This is very critical as we have to do a restore right now and we can’t. I tested several hours and restores work fine on 16.2.4 but not under 17.2.4, 17.2.5 and also 18.2.4. Have not yet tested nightly. I can imagine that since there were heavy modifications in 17.2.4 for NDMP Native Support something is now broken. Looking at the client NDMP Debug log there is one strange behaviour on releases > 16.2.4. ZFS_FILE_SIZE is shown as NULL.

I will attach the debug logs later as I’m currently not at my workstation.
TagsNDMP, Restore broken in 17.2.4, ZFS

Relationships

related to 0001152 closedarogge Release Bareos 18.2.7 

Activities

Owei

Owei

2019-02-16 17:18

reporter   ~0003266

I investigated further comparing the client ndmp debug logs between restore under 16.2.4 and 17.2.5. It seems that the restore running under 17.2.5 some very important info is not passed on to the client. Under 16.2.4 the following entries are logged in the client NDMP debug log file:

5][ndmpd_save_env:526]:env(FILESYSTEM): "/fridge/testsnap@monthly03"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(HIST): "n"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(LEVEL): "0"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(TYPE): "zfs"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(UPDATE): "y"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(USER): "root"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(ZFS_BACKUP_SIZE): "2152710680"

Under 17.2.5 only the following are shown:

 2/16 17:04:53 DEBUG: [5][ndmpd_save_env:526]:env(TYPE): "zfs"
 2/16 17:04:53 DEBUG: [5][ndmpd_save_env:526]:env(USER): "root"

I guess these are very important for the restore.
Owei

Owei

2019-02-16 17:20

reporter   ~0003267

Bareos 17.2.5 Client NDMP Debug Log
ndmplog.0_172_rst (6,518 bytes)   
 2/16 17:03:49 DEBUG: [1][ndmp_door_init:106]:ndmp_door_init: Door server successfully started
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_enable_barcode:884]:Barcode capability on library 1 enabled.
 2/16 17:03:49 DEBUG: [1][add_lib:289]:lib 1 sid 0 lun 0
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_init:556]:nlibs 1
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][add_drv:439]:vlib(2, 1) sid 1 lun 0
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][add_drv:439]:vlib(2, 2) sid 0 lun 0
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:03:49 DEBUG: [1][tlm_init:564]:vlibs 2
 2/16 17:03:49 DEBUG: [1][inaccbl_drv_warn:507]:Warning: The following drives are not accessible:
 2/16 17:03:49 DEBUG: [1][inaccbl_drv_warn:513]:/dev/rmt/1n
 2/16 17:03:49 DEBUG: [1][inaccbl_drv_warn:513]:/dev/scsi/changer/c2t0d0
 2/16 17:04:53 DEBUG: [4][ndmp_run:306]:connection fd: 11
 2/16 17:04:53 DEBUG: [5][ndmp_send_request:458]:handler->mh_xdr_reply == 0
 2/16 17:04:53 DEBUG: [5][connection_handler:866]:connection_fd: 11
 2/16 17:04:53 DEBUG: [5][hardlink_q_init:66]:qhead = 8167cc8
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x900
 2/16 17:04:53 DEBUG: [5][ndmpd_connect_open_v2:170]:set ver to: 4
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x103
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x901
 2/16 17:04:53 DEBUG: [5][ndmpd_connect_client_auth_v3:449]:auth_type MD5
 2/16 17:04:53 DEBUG: [5][ndmpd_connect_auth_md5:1248]:Authorization granted.
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x40a
 2/16 17:04:53 DEBUG: [5][ndmp_connect_sock_v3:1932]:addr 154.2.168.192:52822
 2/16 17:04:53 DEBUG: [5][ndmp_connect_sock_v3:1951]:sock 13
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x402
 2/16 17:04:53 DEBUG: [5][ndmp_buffer_get_size:1005]:Local operation: 64512
 2/16 17:04:53 DEBUG: [5][ndmp_buffer_get_size:1010]:xfer_size: 64512
 2/16 17:04:53 DEBUG: [5][ndmpd_save_env:526]:env(TYPE): "zfs"
 2/16 17:04:53 DEBUG: [5][ndmpd_save_env:526]:env(USER): "root"
 2/16 17:04:53 DEBUG: [5][ndmpd_save_env:526]:env(PREFIX): "/fridge/testsnap@monthly03"
 2/16 17:04:53 DEBUG: [5][ndmpd_save_nlist_v3:749]:orig ""
 2/16 17:04:53 DEBUG: [5][ndmpd_save_nlist_v3:750]:dest "/fridge/restore172"
 2/16 17:04:53 DEBUG: [5][ndmpd_save_nlist_v3:751]:name "NULL"
 2/16 17:04:53 DEBUG: [5][ndmpd_save_nlist_v3:752]:node -1
 2/16 17:04:53 DEBUG: [5][ndmpd_save_nlist_v3:753]:fh_info -1
 2/16 17:04:53 ERROR: [5][ndmpd_zfs_getenv_zfs_backup_size:1635]:ZFS_BACKUP_SIZE env is NULL
 2/16 17:04:53 DEBUG: [5][ndmp_send_request:458]:handler->mh_xdr_reply == 0
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:04:53 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:55 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:55 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:04:55 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:57 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:57 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:04:57 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x407
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:04:59 DEBUG: [5][ndmp_process_messages:1182]:detected eof
 2/16 17:04:59 DEBUG: [5][hardlink_q_cleanup:77]:(1): qhead = 8167cc8
 2/16 17:04:59 DEBUG: [5][connection_handler:894]:Connection terminated
 2/16 17:04:59 DEBUG: [5][ndmp_stop_buffer_worker:1582]:cmds->tcs_command == NULL
 2/16 17:04:59 DEBUG: [5][ndmp_connect_list_find:653]:connection: 0x81a8f48
ndmplog.0_172_rst (6,518 bytes)   
Owei

Owei

2019-02-16 17:21

reporter   ~0003268

Bareos 16.2.4 Client NDMP Debug Log
ndmplog.0_162_rst (6,810 bytes)   
 2/16 17:05:34 DEBUG: [1][ndmp_door_init:106]:ndmp_door_init: Door server successfully started
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_enable_barcode:884]:Barcode capability on library 1 enabled.
 2/16 17:05:34 DEBUG: [1][add_lib:289]:lib 1 sid 0 lun 0
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_init:556]:nlibs 1
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][add_drv:439]:vlib(2, 1) sid 1 lun 0
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][add_drv:439]:vlib(2, 2) sid 0 lun 0
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_ioctl:1168]:tlm_ioctl fd 10 cmd 1225
 2/16 17:05:34 DEBUG: [1][tlm_init:564]:vlibs 2
 2/16 17:05:34 DEBUG: [1][inaccbl_drv_warn:507]:Warning: The following drives are not accessible:
 2/16 17:05:34 DEBUG: [1][inaccbl_drv_warn:513]:/dev/rmt/1n
 2/16 17:05:34 DEBUG: [1][inaccbl_drv_warn:513]:/dev/scsi/changer/c2t0d0
 2/16 17:06:03 DEBUG: [4][ndmp_run:306]:connection fd: 11
 2/16 17:06:03 DEBUG: [5][ndmp_send_request:458]:handler->mh_xdr_reply == 0
 2/16 17:06:03 DEBUG: [5][connection_handler:866]:connection_fd: 11
 2/16 17:06:03 DEBUG: [5][hardlink_q_init:66]:qhead = 8167cc8
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x900
 2/16 17:06:03 DEBUG: [5][ndmpd_connect_open_v2:170]:set ver to: 4
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x103
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x901
 2/16 17:06:03 DEBUG: [5][ndmpd_connect_client_auth_v3:449]:auth_type MD5
 2/16 17:06:03 DEBUG: [5][ndmpd_connect_auth_md5:1248]:Authorization granted.
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x40a
 2/16 17:06:03 DEBUG: [5][ndmp_connect_sock_v3:1932]:addr 154.2.168.192:43410
 2/16 17:06:03 DEBUG: [5][ndmp_connect_sock_v3:1951]:sock 13
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x402
 2/16 17:06:03 DEBUG: [5][ndmp_buffer_get_size:1005]:Local operation: 64512
 2/16 17:06:03 DEBUG: [5][ndmp_buffer_get_size:1010]:xfer_size: 64512
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(FILESYSTEM): "/fridge/testsnap@monthly03"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(HIST): "n"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(LEVEL): "0"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(TYPE): "zfs"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(UPDATE): "y"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(USER): "root"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(ZFS_BACKUP_SIZE): "2152710680"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_env:526]:env(PREFIX): "/fridge/testsnap@monthly03"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_nlist_v3:749]:orig ""
 2/16 17:06:03 DEBUG: [5][ndmpd_save_nlist_v3:750]:dest "/fridge/restore162"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_nlist_v3:751]:name "NULL"
 2/16 17:06:03 DEBUG: [5][ndmpd_save_nlist_v3:752]:node -1
 2/16 17:06:03 DEBUG: [5][ndmpd_save_nlist_v3:753]:fh_info -1
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_getenv_zfs_backup_size:1639]:ZFS_BACKUP_SIZE: 2152710680
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_getenv_level:1570]:env(LEVEL): "0"
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_getenv_zfs_mode:1456]:env(ZFS_MODE) not specified, defaulting to recursive
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_getenv_zfs_force:1524]:env(ZFS_FORCE) not specified, defaulting to FALSE
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_getenv_update:1596]:env(UPDATE): "y"
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_getenv_dmp_name:1610]:env(DMP_NAME) not specified, defaulting to 'level'
 2/16 17:06:03 DEBUG: [5][ndmpd_zfs_restore_pathvalid:1331]:restore path: fridge/restore162
 2/16 17:06:03 DEBUG: [5][ndmp_send_request:458]:handler->mh_xdr_reply == 0
 2/16 17:06:03 NOTICE: [5][ndmpd_zfs_dma_log:2436]:'zfs' recover starting
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:06:03 DEBUG: [7][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [0, 0, 0, 0, 0]
 2/16 17:06:03 DEBUG: [7][ndmpd_remote_read_v3:1836]:to NOTIFY_DATA_READ [0, 18446744073709551615]
 2/16 17:06:03 DEBUG: [7][ndmp_send_request:458]:handler->mh_xdr_reply == 0
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1172]:reply_expected: FALSE
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1252]:received request: 0x400
 2/16 17:06:03 DEBUG: [5][ndmp_process_messages:1280]:no more messages in stream buffer
 2/16 17:06:03 DEBUG: [7][ndmpd_zfs_header_read:443]:tape header: NDMPUTF8MAGIC; 0 0; 64512 
 2/16 17:06:03 DEBUG: [8][ndmpd_zfs_restore_recv_write:913]:nz_zfs_force: 0
 2/16 17:06:03 DEBUG: [9][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [18446744073709487103, 0, 18446744073709551615, 64512, 0]
 2/16 17:06:03 DEBUG: [9][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [18446744073709422591, 0, 18446744073709551615, 129024, 0]
 2/16 17:06:03 DEBUG: [9][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [18446744073709358079, 0, 18446744073709551615, 193536, 0]
 2/16 17:06:03 DEBUG: [9][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [18446744073709293567, 0, 18446744073709551615, 258048, 0]
 2/16 17:06:03 DEBUG: [9][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [18446744073709229055, 0, 18446744073709551615, 322560, 0]
 2/16 17:06:03 DEBUG: [9][ndmpd_remote_read_v3:1781]:ns_data.dd_xx: [18446744073709164543, 0, 18446744073709551615, 387072, 0]
ndmplog.0_162_rst (6,810 bytes)   
arogge

arogge

2019-03-13 10:14

manager   ~0003278

This issue was introduced with "NDMP: fix restore problems with jobs with multiple BSRs" (see https://github.com/bareos/bareos/commit/f733669829db24e69e2ac6977a46f07e6a85ab62)
arogge_adm

arogge_adm

2019-04-10 18:58

administrator   ~0003323

Fix committed to bareos bareos-18.2 branch with changesetid 11105.

Related Changesets

bareos: master a2014835

2019-03-14 10:28

arogge_adm

Ported: N/A

Details Diff
dird: redesign GetNdmpEnvironmentString() API

Fixes 0001056: NDMP restore on 16.2.5 and above does
not fill NDMP environment correctly

Previously one overload of the function
GetNdmpEnvironmentString() wanted a JobDbRecord*
and expected jr->VolSessionId and jr->VolSessionTime
to contain the values for the volume from which the
restore happens. These had to be filled manually
before calling GetNdmlEnvironmentString() which had
not been done since 16.2.5 resulting in 0001056.

This patch now redesigns the API for all overloads
of GetNdmpEnviromentString() to make it harder
to misuse.

We also add a new struct VolumeSessionInfo to wrap
a pair of VolumeSessionId and VolumeSessionTime.
These two numbers are only meaningful together, so
they now have their own container.
Affected Issues
0001056
mod - core/src/cats/cats.h Diff File
mod - core/src/cats/sql_get.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_BAREOS.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_NATIVE.cc Diff File
add - core/src/lib/volume_session_info.h Diff File

bareos: bareos-18.2 e514ec5b

2019-03-14 10:28

arogge_adm

Ported: N/A

Details Diff
dird: redesign GetNdmpEnvironmentString() API

Fixes 0001056: NDMP restore on 16.2.5 and above does
not fill NDMP environment correctly

Previously one overload of the function
GetNdmpEnvironmentString() wanted a JobDbRecord*
and expected jr->VolSessionId and jr->VolSessionTime
to contain the values for the volume from which the
restore happens. These had to be filled manually
before calling GetNdmlEnvironmentString() which had
not been done since 16.2.5 resulting in 0001056.

This patch now redesigns the API for all overloads
of GetNdmpEnviromentString() to make it harder
to misuse.

We also add a new struct VolumeSessionInfo to wrap
a pair of VolumeSessionId and VolumeSessionTime.
These two numbers are only meaningful together, so
they now have their own container.
Affected Issues
0001056
mod - core/src/cats/cats.h Diff File
mod - core/src/cats/sql_get.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_BAREOS.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_NATIVE.cc Diff File
add - core/src/lib/volume_session_info.h Diff File

bareos: master 020ca8e3

2019-03-27 13:05

arogge_adm


Committer: GitHub

Ported: N/A

Details Diff
Merge pull request 0000160 from bareos/dev/arogge/master/fix-1056

dird: redesign GetNdmpEnvironmentString() API
Affected Issues
0001056
mod - core/src/cats/cats.h Diff File
mod - core/src/cats/sql_create.cc Diff File
mod - core/src/cats/sql_get.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_BAREOS.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_NATIVE.cc Diff File
mod - core/src/lib/edit.h Diff File
add - core/src/lib/volume_session_info.h Diff File
mod - core/src/ndmp/ndmos.h Diff File
mod - core/src/ndmp/ndmp4_pp.c Diff File

Issue History

Date Modified Username Field Change
2019-02-14 08:02 Owei New Issue
2019-02-16 17:14 Owei Tag Attached: NDMP
2019-02-16 17:14 Owei Tag Attached: ZFS
2019-02-16 17:14 Owei Tag Attached: Restore broken in 17.2.4
2019-02-16 17:18 Owei Note Added: 0003266
2019-02-16 17:20 Owei File Added: ndmplog.0_172_rst
2019-02-16 17:20 Owei Note Added: 0003267
2019-02-16 17:21 Owei File Added: ndmplog.0_162_rst
2019-02-16 17:21 Owei Note Added: 0003268
2019-03-13 10:12 arogge Assigned To => arogge
2019-03-13 10:12 arogge Status new => assigned
2019-03-13 10:14 arogge Status assigned => confirmed
2019-03-13 10:14 arogge Note Added: 0003278
2019-03-13 10:19 arogge Summary Restore of ZFS NDMP Backup broken in all versions > 16.2.x!!! => NDMP restore on 16.2.5 and above does not fill NDMP environment correctly
2019-04-10 15:23 arogge_adm Changeset attached => bareos master 020ca8e3
2019-04-10 18:58 arogge_adm Changeset attached => bareos master a2014835
2019-04-10 18:58 arogge_adm Changeset attached => bareos bareos-18.2 e514ec5b
2019-04-10 18:58 arogge_adm Note Added: 0003323
2019-05-13 09:37 arogge Status confirmed => resolved
2019-05-13 09:37 arogge Resolution open => fixed
2019-05-13 09:37 arogge Status resolved => closed
2019-12-12 13:28 arogge Relationship added related to 0001152