scp後臺複製

fei890910發表於2020-12-15

1,前臺執行複製 

$ nohup scp  -r /backup/ oracle@10.13.39.5:/recovery/backup1/ 

nohup: ignoring input and appending output to `nohup.out'

Password: 

^Z


2,按ctrl+z 暫停任務

[1]+  Stopped                 nohup scp -r /backup/ oracle@10.13.39.5:/recovery/backup1/

$ ps -ef | grep scp

oracle    54182  98664  4 08:14 pts/0    00:00:00 scp -r /backup/ oracle@10.13.39.5:/recovery/backup1/

oracle    54183  54182 10 08:14 pts/0    00:00:02 /usr/bin/ssh -x -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings yes -loracle 10.13.39.5 scp -r -t /recovery/backup1/

oracle    54604  98664  0 08:14 pts/0    00:00:00 grep scp



3,檢視任務號

$ jobs

[1]+  Stopped                 nohup scp -r /backup/ oracle@10.13.39.5:/recovery/backup1/


4,繼續任務1

$ bg 1

[1]+ nohup scp -r /backup/ oracle@10.13.39.5:/recovery/backup1/ &


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-2742462/,如需轉載,請註明出處,否則將追究法律責任。

相關文章