So I have the following setup:
- Server A (webserver)
- Server B (Xen Dom0 - with logical volumes)
- Server C (backup server)
I want to create backups from server
B to server
C all automatically and securely. I can create a PHP file on server
B which upon accessing will create a backup. However it would need to have PHP being ran on the server.
Now I could also use
ssh2_connect from PHP, which I could use to only run PHP on server
B and execute commands, but those commands require root access. So anyone hacking the webserver or other way get access to the files would have immediate root access.
I have a database on my webserver with the "commands" to do. Like backup VM server 1, then restore VM server 8 etc. That's why I need to send "commands" from server
A to server
My question is, what is the best solution to do this safely? I obviously don't want anyone getting access to server
B except me.