Backing Up WordPress Site Over SSH
Paste the following into terminal while connected over SSH. Now run backup <folder-name>/. Make sure to target the folder where WordPress lives like backup public/ or backup htdocs/. This will generate a full backup with a link to download it.