Syntax for scp command.
Syntax for scp.
scp samples:
Disclaimer: Apply to a TEST environment first. Use on production systems is at DBAs own risk.
Please note that ssh must be installed before you can use scp which copies files or directories from one Unix server to another.
In these samples we will copy from svr01 to svr02
logon as oratest to svr01:
1)
cd /u10/oradata/testdata
scp -rp * oratrn@svr02.domain.com:/u07/oradata/traindata
- Here we copy the content of /u10/oradata/testdata from svr01 to svr02 target location /u07/oradata/traindata, scp prompts you to provide password for svr02 OS user oratrn
2)
cd /u04/backup/OEM/cold_backup/Jan162007
scp -rp * bobby@svr02.domain.com:/u16/backups/OEM/cold_backup/Jan162007
- Here we copy the content of /u04/backup/OEM/cold_backup/Jan162007 from svr01 to svr02 target location /u16/backups/OEM/cold_backup/Jan162007, scp prompts you to provide password for svr02 OS user bobby