How to run scp in background after logging out session ?
Hello,
I am trying to transfer files from old remote server to new remote server using scp command The scp command which works for me is scp -r root@ipaddress:/home/admin/www www It ask me for password and i enter password and it starts uploading files from old remote server to new remote server which i can see but i have files over 45gb so i don't want to see each and every file transferring by looking at putty. I heard scp can run in background so after exiting session from new server or exiting putty the background works. What i did to work scp command in background is : scp -r root@ipaddress:/home/admin/www www after the upload starts cntrl + Z then type [bg] it runs in background which i can see by typing [jobs] then i type [exit] and putty closes then i relogged in again to new server from where i use scp command to see if my job in background is running by typing [jobs] but it didn't show any background processing jobs. What shall i do ? What am i missing ? Please suggest me immediately. |
Perhaps you should look at
Code:
nohup Place the command/s that you wish to be executed in a script - let's call it "xx". Mark the script as executable. Then Code:
nohup ./xx & Now when you logout - the "hangup signal SIGHUP" will be ignored by all of the commands running beneath nohup. As a "bonus" - you can return later and examine any of the output by viewing "nohup.out". Dave |
i am complete newbie in ssh can you please post steps like after entering into ssh mode what i must do ?
like scp -r root@ipaddress:/home/admin/www www then cntrl z or ....etc please post step by step. |
just like "davemguru" wrote
Code:
# nohup scp -r root@ipaddress:/home/admin/www www & Try run something that will do something for at least some time, it's the same way like: Code:
# nohup tar czvf /var/tmp/some_test_file.tar.gz /etc & good luck |
ok i posted this command in ssh
Quote:
Quote:
What shall i do ? i can provide you teamviewer id and pass to check from my computer. |
Then use screen
. |
lithos i am new can you please login to my computer using teamviewer and do it from ssh ? please dear.....
you can private message me your messenger id and i will message you there. Thankyou so much. |
Quote:
|
after reading tutorial i am unable to understand, please you just have to run a scp command which works in background so after closing ssh it works.
|
Again, this forum doesn't work like that. I suggest you remove your email addresses, unless you want spam (not from LQ members, but from bots that will harvest them).
Again, what exactly is the problem using Screen? You just run "screen" at the terminal, then run your scp command and use "Ctrl-a d" to detach the Screen session and you can log out. When you log in, you can run "screen -r" to reattach the session. |
sure i will remove my email address after few minutes after lithos messages me, nylex why dont you please show me how it can be done on my computer.
i am online its just running scp command in background. Thankyou. |
I've just shown you how to do it, so I don't understand what the problem is.
|
i am newbie in ssh, i have come to linuxquestions to receive support from linux addicts. Please its matter of only running scp command in background can you please login to my computer using teamviewer and put the command to work....please.
|
I'm not going to log into your machine and I don't think you'll find others to do that, either. What is the problem with doing this yourself?
|
i dont want any of the files to be deleted or something wierd happened to server.
i can pay anyone $5 through paypal who completes this project after the work is completed and i am not joking. If you trust you can message me. |
All times are GMT -5. The time now is 12:47 PM. |