by Ken Task.
@Ray .... piggy-backing makes threads confusing .... your NAS isn't same as original posters environment ...
Got ssh into your server?
IF so, one can find a backup.php file in code/admin/cli/ that will not use browser/web service .... thus no 504 time outs.
Suggest trying that!
'SoS', Ken