XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Error mirroring full backups to backblaze b2

    Scheduled Pinned Locked Moved Backup
    13 Posts 3 Posters 348 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • florentF Offline
      florent Vates πŸͺ XO Team @florent
      last edited by

      now that I am in front of the source code , it is already getting the real size, so it should compute the right size

      are the source or destination encrypted ?

      florentF 1 Reply Last reply Reply Quote 0
      • florentF Offline
        florent Vates πŸͺ XO Team @florent
        last edited by

        @pedro_udifar we have found a clue , if the destination is encrypted and the source is not

        can you test this branch ? https://github.com/vatesfr/xen-orchestra/pull/10061
        if you are using a xoa, we can deploy the fix if you open a support tunnel

        fbeauchamp opened this pull request in vatesfr/xen-orchestra

        open fix(fs): compute the output stream precisely when encrypted #10061

        1 Reply Last reply Reply Quote 2
        • P Offline
          pedro_udifar
          last edited by

          Hello Poddingue and Florent,

          I started duplicating "default" minPartSize but the larger VMs we're still failing to mirror. After that, I found that Bacblaze has a recommended chunk size of minPartSize=100000000 and, with this setting, all my VMs completed without that specific error.
          (My largest VM compressed backup is about 450 GB)

          31fe31fc-9b8e-4b7d-b960-1b1f711a4901-image.jpeg
          https://www.backblaze.com/docs/cloud-storage-large-files
          In my case, the recommendPartSize returned was 100000000.

          Since I was also getting the other warnings "Issue checking XVA" and "XVA might be broken", most o f the times I would wipe de backblaze bucket and start with a new job no XO (so that I could be sure it was not about the retention settings of this mirror job).

          Replication source is on a local NFS Ztsd compressed, not encripted.
          Replication destinations is Backblaze with encription. Object lock is turned off (XO can delete and change the files without restrictions)

          I'm still getting the XVA warnings and my next step was to run a test turning encription on, on the local 1st tier nfs remote.

          The sizes reported locally and on backblaze have very different sizes, which I guess is to be expected on this scenario.

          Local:
          839a2c6d-3f6c-44fe-8319-d0a54ed9188d-image.jpeg

          Backblaze:
          11eecec4-7d90-4216-b891-7f881c8421c8-image.jpeg

          In my planned backup pipeline, I am planning to turn on object lock on backblaze, making sure it's aligned with mirror retention settings on XO thoug I'm not sure this will work nice with metadata json files. What do you guys think?

          I'll gladly test the fix when it's ready. Is already commited?

          Thank you for your help,
          Pedro

          florentF 1 Reply Last reply Reply Quote 0
          • florentF Offline
            florent Vates πŸͺ XO Team @pedro_udifar
            last edited by

            @pedro_udifar object lock works quite well with xo
            it is automatically detected if the s3 user has enough privilege to see if object lock is enabled

            the main point is that it won't create "cache.json.gz" files since theses files must be updated, so the backup listing is a little slower

            note that XO retention should be at least 1 more than object lock . At worst you will have error , saying that XO coudn't delete an old backup

            The fix is on a separated branch : fix_s3_nonencrypted_to_encrypted_xva ( PR : https://github.com/vatesfr/xen-orchestra/pull/10061 )

            fbeauchamp opened this pull request in vatesfr/xen-orchestra

            open fix(fs): compute the output stream precisely when encrypted #10061

            1 Reply Last reply Reply Quote 0
            • P Offline
              pedro_udifar
              last edited by

              @florent said:

              fix_s3_nonencrypted_to_encrypted_xva

              Hello Florent,

              Branch built and testing
              Test procedure: removed the minPartSize=100000000 from remote definition, deleted the b2 backup and restarted the mirror backup. There are some other VMs that will also be uploaded to B2 so it will take a while. Expect feedback tomorrow.

              Thank you,
              Pedro

              1 Reply Last reply Reply Quote 2
              • P Offline
                pedro_udifar
                last edited by

                Still getting these warnings, on the VMs that don't need to be uploaded. Thought this might go away also.

                838c12d7-315d-4e4d-bc76-acb4dd9e74d9-image.jpeg

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pedro_udifar
                  last edited by

                  Hello Florent,

                  The new code is still failing...

                  a7b27068-0bbb-4ea6-b0e7-74f8058775f3-image.jpeg

                  	```
                  	{
                  		"id": "0mr3li2kt-c10ifxuuw68",
                  		"start": 1783002246797,
                  		"status": "failure",
                  		"tasks": [
                  			{
                  				"id": "0mr3li2ud-r1vgn4rnv5d",
                  				"start": 1783002247141,
                  				"status": "failure",
                  				"tasks": [
                  					{
                  						"id": "0mr3li30l-6n1cr5a6o7v",
                  						"start": 1783002247365,
                  						"status": "failure",
                  						"end": 1783004124397,
                  						"result": {
                  							"message": "read 52428800012 bytes, maximum size allowed  is 52428800000 ",
                  							"name": "Error",
                  							"stack": "Error: read 52428800012 bytes, maximum size allowed  is 52428800000 \n    at Transform.transform [as _transform] (/opt/xo/xo-builds/xen-orchestra-202607021439/@xen-orchestra/fs/dist/s3.js:214:20)\n    at Transform._write (node:internal/streams/transform:171:8)\n    at writeOrBuffer (node:internal/streams/writable:570:12)\n    at _write (node:internal/streams/writable:499:10)\n    at Writable.write (node:internal/streams/writable:508:10)\n    at PassThrough.ondata (node:internal/streams/readable:1012:24)\n    at PassThrough.emit (node:events:509:28)\n    at PassThrough.patchedEmit [as emit] (/opt/xo/xo-builds/xen-orchestra-202607021439/@xen-orchestra/log/configure.js:52:17)\n    at addChunk (node:internal/streams/readable:563:12)\n    at readableAddChunkPushObjectMode (node:internal/streams/readable:540:3)"
                  						},
                  						"message": "transfer",
                  						"data": {
                  							"progress": 0
                  						}
                  					}
                  				],
                  				"end": 1783004124397,
                  				"result": {
                  					"message": "read 52428800012 bytes, maximum size allowed  is 52428800000 ",
                  					"name": "Error",
                  					"stack": "Error: read 52428800012 bytes, maximum size allowed  is 52428800000 \n    at Transform.transform [as _transform] (/opt/xo/xo-builds/xen-orchestra-202607021439/@xen-orchestra/fs/dist/s3.js:214:20)\n    at Transform._write (node:internal/streams/transform:171:8)\n    at writeOrBuffer (node:internal/streams/writable:570:12)\n    at _write (node:internal/streams/writable:499:10)\n    at Writable.write (node:internal/streams/writable:508:10)\n    at PassThrough.ondata (node:internal/streams/readable:1012:24)\n    at PassThrough.emit (node:events:509:28)\n    at PassThrough.patchedEmit [as emit] (/opt/xo/xo-builds/xen-orchestra-202607021439/@xen-orchestra/log/configure.js:52:17)\n    at addChunk (node:internal/streams/readable:563:12)\n    at readableAddChunkPushObjectMode (node:internal/streams/readable:540:3)"
                  				},
                  				"message": "export",
                  				"data": {
                  					"id": "14b59f44-4517-411e-9e39-4eb7136928d0",
                  					"type": "remote",
                  					"isFull": true
                  				}
                  			},
                  			{
                  				"id": "0mr3mmbcf-yc4lpd0z5p",
                  				"start": 1783004124399,
                  				"status": "success",
                  				"warnings": [
                  					{
                  						"data": {
                  							"path": "xo-vm-backups/1c842f34-f7f8-d3cd-ba24-ffe51d6ae075/cache.json.gz",
                  							"actual": 0,
                  							"expected": 1
                  						},
                  						"message": "unexpected number of entries in backup cache"
                  					},
                  					{
                  						"data": {
                  							"error": {
                  								"generatedMessage": false,
                  								"code": "ERR_ASSERTION",
                  								"actual": true,
                  								"expected": false,
                  								"operator": "strictEqual",
                  								"diff": "simple"
                  							}
                  						},
                  						"message": "Issue while checking XVA"
                  					},
                  					{
                  						"data": {
                  							"error": {
                  								"generatedMessage": false,
                  								"code": "ERR_ASSERTION",
                  								"actual": true,
                  								"expected": false,
                  								"operator": "strictEqual",
                  								"diff": "simple"
                  							}
                  						},
                  						"message": "Checksum file not valid, not blocking"
                  					},
                  					{
                  						"data": {
                  							"path": "/xo-vm-backups/1c842f34-f7f8-d3cd-ba24-ffe51d6ae075/20260624T231818Z.xva"
                  						},
                  						"message": "XVA might be broken"
                  					},
                  					{
                  						"data": {
                  							"files": [
                  								"20260624T231818Z.json",
                  								"20260624T231818Z.xva",
                  								"20260624T231818Z.xva.checksum"
                  							]
                  						},
                  						"message": "This files may be corrupted but not yet to be removed"
                  					}
                  				],
                  				"end": 1783004124983,
                  				"result": {
                  					"merge": false,
                  					"size": 0
                  				},
                  				"message": "clean-vm"
                  			}
                  		],
                  		"end": 1783004124983,
                  		"result": {
                  			"message": "read 52428800012 bytes, maximum size allowed  is 52428800000 ",
                  			"name": "Error",
                  			"stack": "Error: read 52428800012 bytes, maximum size allowed  is 52428800000 \n    at Transform.transform [as _transform] (/opt/xo/xo-builds/xen-orchestra-202607021439/@xen-orchestra/fs/dist/s3.js:214:20)\n    at Transform._write (node:internal/streams/transform:171:8)\n    at writeOrBuffer (node:internal/streams/writable:570:12)\n    at _write (node:internal/streams/writable:499:10)\n    at Writable.write (node:internal/streams/writable:508:10)\n    at PassThrough.ondata (node:internal/streams/readable:1012:24)\n    at PassThrough.emit (node:events:509:28)\n    at PassThrough.patchedEmit [as emit] (/opt/xo/xo-builds/xen-orchestra-202607021439/@xen-orchestra/log/configure.js:52:17)\n    at addChunk (node:internal/streams/readable:563:12)\n    at readableAddChunkPushObjectMode (node:internal/streams/readable:540:3)"
                  		},
                  		"message": "backup VM",
                  		"data": {
                  			"id": "1c842f34-f7f8-d3cd-ba24-ffe51d6ae075",
                  			"type": "VM",
                  			"progress": 0
                  		}
                  	},
                  

                  Best regards,
                  Pedro

                  florentF 1 Reply Last reply Reply Quote 0
                  • florentF Offline
                    florent Vates πŸͺ XO Team @pedro_udifar
                    last edited by

                    @pedro_udifar that is strange that we have exactly the same error, even though we should have added 28 bytes

                    I pushed a little debug that will log additional lines in journalctl

                    'will output stream ', 'stream is encrypted' and 'stream is updated '

                    Can you update your branch, rebuild, rerun the transfer and post the log ( with the attached values ) ?

                    regards

                    P 1 Reply Last reply Reply Quote 0
                    • P Offline
                      pedro_udifar @florent
                      last edited by

                      @florent

                      Sure, but I can only do it over the weekend.
                      Also, I'll try to check if the script built the correct branch. First time using the script to build anything other than master.

                      On a side note: recently some other strange errors started to show up "Body timeout Error". These are plain full backups to a remote with disaster recovery for another cluster, that always worked fine. Also, in this case, the timeout defined within the job doesn't cancel the job and the remaining jobs in the sequence don't run. Haven't had the time to dig into this - when I do, I'll start a new forum post.

                      790bd845-1932-4f33-abfd-36441d720aa1-image.jpeg

                      Cheers,
                      Pedro

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        pedro_udifar
                        last edited by

                        Hello again!

                        c5189e53-c2d1-4de5-a26d-243ddd41e5db-image.jpeg

                        Here are the logs:
                        b2_mirror_error.txt

                        Hope it helps!

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better πŸ’—

                        Register Login
                        • First post
                          Last post