One way to let the script run even after you close your terminal is by using the “nohup “ (no hangup) command as follows:
nohup ./backup-script &
You still need to find the process id to stop the script when you log back in though. Instead of going through the hassle, we can create an init script and start or stop our backup daemon whenever we need to.
you need vim editor ,here is how you can use vim tutorial