You may get a 524 error on your website
Is this case it was during creation of a full site backup using Duplicator plugin for WordPress, but the error may occur on any intensive workload with strict timeout settings.
The “ray id” part of the error comes from Cloudflare which is used for CDN on the website.
Bringing the site to Development mode, which temporarily disables the cache, does not resolve the error.
What you have to do is to completely pause Cloudflare on the website in the Cloudflare dashboard.
It will warn you about some possible problems, acknowledge that.
With Cloudflare disabled, the operation completes without an error.
Do not forget to enable Cloudflare again.
If you still experience the error, you may just need to restart your webserver or VPS server.
You may also try playing with Duplicator plugins settings in the Packages tab
First of all, increase Query Limit Size to 2000.
Try using DAB archive instead of zip.
And try to use mysqldump method instead of PHP. Mysqldump is part on mysql-client, so install it
sudo apt-get install mysql-client