I should also have asked about network-related bottlenecks.
Take a look at Large NFS mount sync to another NFS mount .
It’s not clear to me that you can speed this up a whole lot based on what I know so far. Ideally the database would be on a local SSH rather than on an NFS mount.