i am trying to figure out a way to backup transfer and restore over ssh in one shot

Harishkumar .Pathangay

i am trying to figure out a way to backup transfer and restore over ssh in one shot

hi,
i am trying to figure out a way to backup transfer and restore over ssh in one shot.
For example,
tar -cvf - images/dogs | ssh [login to unmask email] '(cd new_images; tar -xf -)'
look at the above command how it is zipping and extracting over ssh all in one go.

How can I do similar thing for a backup and restore of database.
I tried certain variations but not working. I do not want to create a backup file. The backup command should stream the file into ssh and following that restore should happen on the other server. Like Every thing in One Shot.
This would be an awesome feature for me, for initializing standby database at quantum speeds.
Just for Fun. Cheers !!!

thanks,
Harish Pathangay

Harishkumar .Pathangay

RE: i am trying to figure out a way to backup transfer and restore over ssh in one shot
(in response to Harishkumar .Pathangay)

db2 backup db hadr online to /home/db2inst1/stream| cat /home/db2inst1/stream | ssh [login to unmask email] 'cat >> /home/db2inst1/stream'

that solved it.

please treat thread closed.

Nadir Doctor

i am trying to figure out a way to backup transfer and restore over ssh in one shot
(in response to Harishkumar .Pathangay)
Hi Harish,

You may also find it helpful to test for [1] backup being successful at
source prior to commencement of restore and [2] target database has no
active database connections and been deactivated so that restore of this
backup image is successful.
.

Best Regards,
Nadir



On Mon, Dec 25, 2017 at 11:44 PM, Harishkumar .Pathangay <
[login to unmask email]> wrote:

> db2 backup db hadr online to /home/db2inst1/stream| cat
> /home/db2inst1/stream | ssh [login to unmask email] 'cat >>
> /home/db2inst1/stream'
>
> that solved it.
>
> please treat thread closed.
>
> -----End Original Message-----
>

Harishkumar .Pathangay

i am trying to figure out a way to backup transfer andrestore over ssh in one shot
(in response to Nadir Doctor)
Hi,
My Test reveals some thing different, my understanding is also a little different.
The Backup is done to a named pipe, not a regular disk file. So until I start the restore, backup itself won’t start and push the data into named pipe.
The Named Pipe will just wait in the source, till it is consumption starts at the restore point.
I am not having a huge db to test it, but I can say reasonably sure that is my understanding of it and test cases do confirm that with a 200MB database.
Named Pipe is like a stream, it has to get consumed then only more flow from the source will be there.

Thanks,
Harish Pathangay

Sent from Mail for Windows 10

From: Nadir Doctor
Sent: 26 December 2017 16:43
To: [login to unmask email]
Subject: [DB2-L] - RE: i am trying to figure out a way to backup transfer andrestore over ssh in one shot

Hi Harish,

You may also find it helpful to test for [1] backup being successful at source prior to commencement of restore and [2] target database has no active database connections and been deactivated so that restore of this backup image is successful.
.

Best Regards,
Nadir
 


On Mon, Dec 25, 2017 at 11:44 PM, Harishkumar .Pathangay <[login to unmask email]> wrote:
db2 backup db hadr online to /home/db2inst1/stream| cat /home/db2inst1/stream | ssh [login to unmask email] 'cat >> /home/db2inst1/stream'
that solved it.
please treat thread closed.


Site Links: View post online   View mailing list online   Start new thread via email   Unsubscribe from this mailing list   Manage your subscription  

This email has been sent to: [login to unmask email]
Setup a data refresh task in less time than it takes to make a cup of coffee + save up to 90% in CPU
ESAi's BCV5 & XDM fast data refresh & Test Data Mgmt products will make you a hero to users. See
http://www.ESAIGroup.com/idug

Use of this email content is governed by the terms of service at:
http://www.idug.org/p/cm/ld/fid=2




Site Links: View post online   View mailing list online   Start new thread via email   Unsubscribe from this mailing list   Manage your subscription  

This email has been sent to: [login to unmask email]
Setup a data refresh task in less time than it takes to make a cup of coffee + save up to 90% in CPU
ESAi's BCV5 & XDM fast data refresh & Test Data Mgmt products will make you a hero to users. See
http://www.ESAIGroup.com/idug

Use of this email content is governed by the terms of service at:
http://www.idug.org/p/cm/ld/fid=2


Attachments

  • 4BF66487C5E84DC4B7845339ECBBF45A.png (<1k)
  • 438132D7CCEF4A22898542CFCC8C4C3A.png (<1k)

Harishkumar .Pathangay

RE: i am trying to figure out a way to backup transfer andrestore over ssh in one shot
(in response to Harishkumar .Pathangay)

hi nadir,

my bad. I never did mention that /home/db2inst1/stream was a named pipe.

My Bad. Thanks for your inputs. Thanks. Harish Pathangay