(self, srcname, dstpath)
Restore the xlog file from slave.
Restore the xlog file from slave.
Restore the xlog file from slave .
def master_xrestore(self, srcname, dstpath):
        """
        Restore the xlog file from slave.
        """
        paths = [ self.cf.getfile("completed_wals"), self.cf.getfile("partial_wals") ]

        self.log.info("Restore %s to %s", srcname, dstpath)
        for src in paths:
            self.log.debug("Looking in %s", src)
            srcfile = os.path.join(src, srcname)
            if self.exec_rsync([srcfile, dstpath]) == 0:
                return
        self.log.warning("Could not restore file %s", srcname)
def master_xrestore ( self , srcname , dstpath ) : paths = [ self . cf . getfile ( "completed_wals" ) , self . cf . getfile ( "partial_wals" ) ] self . log . info ( "Restore %s to %s" , srcname , dstpath ) for src in paths : self . log . debug ( "Looking in %s" , src ) srcfile = os . path . join ( src , srcname ) if self . exec_rsync ( [ srcfile , dstpath ] ) == 0 : return self . log . warning ( "Could not restore file %s" , srcname )