Ensuring rebuild continues even if terminal session ends (nohup)

Currently after getting a backup via the command line, and running cleanup, I type this:

./launcher rebuild mail-receiver 2>&1 | tee ~/$(date +%Y-%m-%d)-rebuild-mail-receiver.log
./launcher rebuild app 2>&1 | tee ~/$(date +%Y-%m-%d)-rebuild-app.log

I’m vaguely aware of nohup. Would it be beneficial? If so, how might I amend the commands? If not, what would help? Thanks.

Rather than the old school nohup you’re better off using tmux (my favorite) or screen. Screen used to be more widely available, I think, but I’m pretty sure tmux is mostly available.

If your session gets disconnected you can ssh back in and reconnected with tmux attach. It’s also handy as it’ll let multiple people view the same terminal at once.

Yep:

I would recommend tmux; it’s very simple to use. I’ve had the same question before, and the answer’s was still tmux. I took the liberty to write about how to use it a while back.