View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001533 | bareos-core | vmware plugin | public | 2023-04-29 13:41 | 2023-05-03 23:32 |
Reporter | CirocN | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Linux | OS | RHEL (and clones) | OS Version | 8 |
Product Version | 22.0.3 | ||||
Summary | 0001533: Restoring vmware vms keeps failing, can't restore the data. | ||||
Description | First I need to mention I am new to Bareos and I have been working with it for the past couple of weeks to replace our old backup solution. I am trying to use the VMware plugin to get backups of our vmdks for disaster recovery or if we need to extract a specific file using guestfish. I have followed the official documents regarding setting up the VMware plugin at https://docs.bareos.org/TasksAndConcepts/Plugins.html#general The backups of the vm in our vSphere server is successful. But when I try to restore the backups it keeps failing with the following information: bareos87.simlab.xyz-fd JobId 3: Fatal error: bareosfd: Traceback (most recent call last): File "/usr/lib64/bareos/plugins/BareosFdWrapper.py", line 85, in create_file return bareos_fd_plugin_object.create_file(restorepkt) File "/usr/lib64/bareos/plugins/BareosFdPluginVMware.py", line 504, in create_file cbt_data = self.vadp.restore_objects_by_objectname[objectname]["data"] KeyError: '/VMS/Datacenter/backup_client/[DatastoreVM] backup_client/backup_client.vmdk I have tried the same steps on Bareos 21 and 20, and also tried it on Redhat 9.1 and I kept getting same exact error. | ||||
Steps To Reproduce | After setting up the vmware plugin accoding to official documents, I have ran the backups using: run job=vm-websrv1 level=Full Web-GUI shows the job instantly and after about 10 minutes the job's status shows success. Right after the backup is done when I try to restore the backup using Web-GUI or console, I keep getting the same error: 19 2023-04-29 07:34:05 bareos-dir JobId 4: Error: Bareos bareos-dir 22.0.4~pre63.807bc5689 (17Apr23): Build OS: Red Hat Enterprise Linux release 8.7 (Ootpa) JobId: 4 Job: RestoreFiles.2023-04-29_07.33.59_43 Restore Client: bareos-fd Start time: 29-Apr-2023 07:34:01 End time: 29-Apr-2023 07:34:05 Elapsed time: 4 secs Files Expected: 1 Files Restored: 0 Bytes Restored: 0 Rate: 0.0 KB/s FD Errors: 1 FD termination status: Fatal Error SD termination status: Fatal Error Bareos binary info: Bareos community build (UNSUPPORTED): Get professional support from https://www.bareos.com Job triggered by: User Termination: *** Restore Error *** 18 2023-04-29 07:34:05 bareos-dir JobId 4: Warning: File count mismatch: expected=1 , restored=0 17 2023-04-29 07:34:05 bareos-sd JobId 4: Releasing device "FileStorage" (/var/lib/bareos/storage). 16 2023-04-29 07:34:05 bareos-sd JobId 4: Error: lib/bsock_tcp.cc:454 Socket has errors=1 on call to client:192.168.111.136:9103 15 2023-04-29 07:34:05 bareos-sd JobId 4: Fatal error: stored/read.cc:146 Error sending to File daemon. ERR=Connection reset by peer 14 2023-04-29 07:34:05 bareos-sd JobId 4: Error: lib/bsock_tcp.cc:414 Wrote 65536 bytes to client:192.168.111.136:9103, but only 16384 accepted. 13 2023-04-29 07:34:04 bareos87.simlab.xyz-fd JobId 4: Fatal error: bareosfd: Traceback (most recent call last): File "/usr/lib64/bareos/plugins/BareosFdWrapper.py", line 85, in create_file return bareos_fd_plugin_object.create_file(restorepkt) File "/usr/lib64/bareos/plugins/BareosFdPluginVMware.py", line 504, in create_file cbt_data = self.vadp.restore_objects_by_objectname[objectname]["data"] KeyError: '/VMS/Datacenter/backup_client/[DatastoreVM] backup_client/backup_client.vmdk' 12 2023-04-29 07:34:04 bareos-sd JobId 4: Forward spacing Volume "Full-0001" to file:block 0:627. 11 2023-04-29 07:34:04 bareos-sd JobId 4: Ready to read from volume "Full-0001" on device "FileStorage" (/var/lib/bareos/storage). 10 2023-04-29 07:34:04 bareos87.simlab.xyz-fd JobId 4: Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 9 2023-04-29 07:34:04 bareos87.simlab.xyz-fd JobId 4: Connected Storage daemon at bareos87.simlab.xyz:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 8 2023-04-29 07:34:02 bareos-dir JobId 4: Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 7 2023-04-29 07:34:02 bareos-dir JobId 4: Handshake: Immediate TLS 6 2023-04-29 07:34:02 bareos-dir JobId 4: Connected Client: bareos-fd at localhost:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 5 2023-04-29 07:34:02 bareos-dir JobId 4: Probing client protocol... (result will be saved until config reload) 4 2023-04-29 07:34:02 bareos-dir JobId 4: Using Device "FileStorage" to read. 3 2023-04-29 07:34:02 bareos-dir JobId 4: Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 2 2023-04-29 07:34:02 bareos-dir JobId 4: Connected Storage daemon at bareos87.simlab.xyz:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 1 2023-04-29 07:34:01 bareos-dir JobId 4: Start Restore Job RestoreFiles.2023-04-29_07.33.59_43 | ||||
Tags | No tags attached. | ||||
bareos-master: impact | |||||
bareos-master: action | |||||
bareos-19.2: impact | |||||
bareos-19.2: action | |||||
bareos-18.2: impact | |||||
bareos-18.2: action | |||||
bareos-17.2: impact | |||||
bareos-17.2: action | |||||
bareos-16.2: impact | |||||
bareos-16.2: action | |||||
bareos-15.2: impact | |||||
bareos-15.2: action | |||||
bareos-14.2: impact | |||||
bareos-14.2: action | |||||
bareos-13.2: impact | |||||
bareos-13.2: action | |||||
bareos-12.4: impact | |||||
bareos-12.4: action | |||||
|
|
As all continuous tests are working perfectly, you certainly miss a point into your configuration, without the configuration nobody will be able to find the problem. Also if you want to show a job result screeshots are certainly the worse way. please use the text log result of bconsole <<< "list joblog jobid=2" as attachement here. |
|
I have found out that this is the result of miss matching the backup path and restore path. The backup is getting created with /VMS/Datacenter//backup_client/[DatastoreVM] backup_client/backup_client.vmdk while /VMS/Datacenter/backup_client/[DatastoreVM] backup_client/backup_client.vmdk. I have noticed in your trying to strip it off on BareosFdPluginVMware.py on line 366 but it is not working. CODE: if "uuid" in self.options: self.vadp.backup_path = "/VMS/%s" % (self.options["uuid"]) else: self.vadp.backup_path = "/VMS/%s/%s/%s" % ( self.options["dc"], self.options["folder"].strip("/"), self.options["vmname"], ) My configuration for the folder is precisely what is suggested in the official document: folder=/ The workaround I have found for now was to edit the BareosFdPluginVMware.py Python script to the following code but it needs to get properly fixed: CODE: if "uuid" in self.options: self.vadp.backup_path = "/VMS/%s" % (self.options["uuid"]) else: self.vadp.backup_path = "/VMS/%s%s/%s" % ( self.options["dc"], self.options["folder"].strip("/"), self.options["vmname"], ) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2023-04-29 13:41 | CirocN | New Issue | |
2023-04-29 13:41 | CirocN | File Added: Restore_Failure.png | |
2023-04-29 13:41 | CirocN | File Added: Backup_Success.png | |
2023-05-03 15:37 | bruno-at-bareos | Note Added: 0004995 | |
2023-05-03 23:32 | CirocN | Note Added: 0005003 | |
2023-05-03 23:32 | CirocN | File Added: BareosFdPluginVMware.png | |
2023-05-03 23:32 | CirocN | File Added: docs.bareos.org-instruction.png |