You can export these tables with phpMyAdmin. Specify Data only and to use REPLACE:
- BackupsSettings
- BackupsScheduled
- BackupExcludeFiles
Then import them on the destination server. Then run this to rsync existing backup files over:
Bash:
rsync -av /var/lib/psa/dumps/ root@NEW_SERVER_IP:/var/lib/psa/dumps
This is confirmed working on servers that only have one customer (ie: web admin licenses) and for which backups are configured only to the local server. Will do more testing to find out if it works with external backup storage connections like Dropbox.
When it comes to multiple customer servers, from what I can gather the following fields connect each backup config to the correct client or subscription ID (whether customer or reseller) from the 'clients' table:
- Table: BackupsSettings -- Field: id
- Table BackupsScheduled -- Field: obj_id
After the export from the source server, we'd need to find some way to obtain the new client ID from the destination server. We'd then edit the export dump to replace the old ID with the new one, before then importing it on the destination server.
I'm guessing the client guid should remain consistent, so I suppose we could run this on the source:
SQL:
SELECT clients.guid, BackupsScheduled.id FROM BackupsScheduled
LEFT JOIN clients
ON BackupsScheduled.obj_id=clients.id
WHERE clients.id != 1
And this on the destination
SQL:
SELECT guid, id FROM clients WHERE clients.id != 1
AND guid IN (GUID1, GUID2, GUID3)
(Where each of the GUID values are the results from the query on the source server)
Then manually update the IDs in BackupsSettings and BackupsScheduled to match the new ID values.
Bit of a pain, and I'm not sure if this'll work for Cloud backup options like Dropbox or OneDrive.