Actually extremely simple. I will demo you an example using ssh.Given: local server name: s3 and db name: d3 remote server name: s4# create the pipe[db2inst2@s3 ~]$ mkfifo ~/d3_bar.pipe# pipe...
显示全部Actually extremely simple. I will demo you an example using ssh.
Given: local server name: s3 and db name: d3
remote server name: s4
# create the pipe
[db2inst2@s3 ~]$ mkfifo ~/d3_bar.pipe
# pipe the output to remote location
[db2inst2@s3 ~]$ cat < d3_bar.pipe | ssh s4 "dd of=/tmp/s3d3_to_s4.bkp" &
# start the backup into the pipe
[db2inst2@s3 ~]$ db2 backup db d3 to ~/d3_bar.pipe
296136+0 records in
296136+0 records out
151621632 bytes (152 MB) copied, 50.2352 s, 3.0 MB/s
Backup successful. The timestamp for this backup image is : 20150616152442
[1]+ Done cat < d3_bar.pipe | ssh s4 "dd of=/tmp/s3d3_to_s4.bkp"
收起