equal
deleted
inserted
replaced
661 |
661 |
662 def run(self, args): |
662 def run(self, args): |
663 import tempfile |
663 import tempfile |
664 srcappid = pop_arg(args, 1, msg='No source instance specified !') |
664 srcappid = pop_arg(args, 1, msg='No source instance specified !') |
665 destappid = pop_arg(args, msg='No destination instance specified !') |
665 destappid = pop_arg(args, msg='No destination instance specified !') |
666 _, output = tempfile.mkstemp() |
666 # XXX -system necessary to match file name modified on source restore. |
|
667 # should not have to expect this. |
|
668 _, output = tempfile.mkstemp('-system.sql') |
667 if ':' in srcappid: |
669 if ':' in srcappid: |
668 host, srcappid = srcappid.split(':') |
670 host, srcappid = srcappid.split(':') |
669 _remote_dump(host, srcappid, output, self.config.sudo) |
671 _remote_dump(host, srcappid, output, self.config.sudo) |
670 else: |
672 else: |
671 _local_dump(srcappid, output) |
673 _local_dump(srcappid, output) |