12

how to properly execute remote commands (scripts)

view full story
linux-howto

http://unix.stackexchange.com – I have 2 servers; box01 and box02. I need box02 to execute some commands on box01. One of the things it needs to do is start a backup script that runs for a number of hours. I would like the command on box02 to “fire” and then be running totally independent on box01, like box02 was never there in the first place. This is what I have done so far: box01 contains has the script: /root/backup.sh box02 is scheduled to run this: ssh root@box02 'nohup /root/backup.sh' & Am I doing this the right way? Is there a better way to do this? Will I run into any trouble doing it this way? (HowTos)