There are times when we need to do some job or run some script which takes a lot of time. During this the connection can get aborted which results in the job getting killed. There is simple solution for this, Use NOHUP.
The command syntax is easy:-
nohup <command> &
here <command> is the command or script you're running. An & is need to put the command in the background as nohup doesn't do this itself.
For example, when you log-in to the remote server using ssh.
# ssh [email protected]
now you want to run a backup script rsync_script.sh which takes a long time, then you can run,
# nohup rsync_script.sh &
you can now logout from the terminal & the script will continue to run until its completed.