All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
any convenient way to run long-time script on server without my PC stays on?
Hi guys , I got a little inconvenient problem,
let's say , for example I have to do a rsync with few hundreds GB , which takes hours and hours to finished , and during that time I have to keep SSH terminal open, but sometimes during the rsync , something will knock me offline , take PC reboot , pack and take it out so whatever the case is, which will effectively terminated rsync operation.
and the VPS provider doesn't provide VNC , my current way out of this is using VPS2 with VNC , and SSH from VPS2 into VPS1 and doing rsync there, but this is most inconvenient, as VPS2 only comes with web-based VNC which is NOT operable in mobile browser.
so there is any way , I can keep command or script running on VPS , while I can safely offline ?
perhaps cron , but I don't know why same command on SSH is working fine and on cron will just failed miserably ,
do I have any other options ?
Comments
Run it in screen
https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/
https://www.howtoforge.com/linux_screen
tmux, screen, or just nohup
Screen will work. Launch screen, run your command. Ctrl+a-d to detach, logout of ssh. When you ssh back in, screen -r to resume.
byobu command is a friendly frontend to screen /tmux, included in Ubuntu /debian repos
okay ,screen looks promising , but next question is , if I use mobile device , how can I "ctrl + a + d" ? I mean , I can do ctrl +a and/or ctrl +d , but I think I can't make it happen ctrl +a +d ...
thanks , but I will try screen first.
When I ssh to a server and open screen let's say in Putty or xterm, if I close (not logout) the ssh session (or the ssh session is disconnected), the screen usually detaches on its own. So no need to detach with ctrl+a-d. Usually when I ssh back in, I can just type screen -r to resume despite not "cleanly" detaching.
never mind , I figured out.
thank you guys , much appreciated.
On Android, use JuiceSSH, they have nice buttons for ctl, esc, arrows, etc. Best way to do terminal work on a mobile.
...or a portable Bluetooth keyboard?
As matter of fact that's what I am using , the thing is not CTRL, it's about how do you input 3 key simultaneously.
In that case, I'd say it's even more inconvenient...
OK. An IBM Model M, a USB->PS/2 adapter, an AT->PS/2 adapter, and an OTG adapter.
Oh, and a phone.
The control button will stay pressed just press 1 by 1 and it will detached i use it daily