(self)
List available backups. On master this just calls slave listbackups via SSH
List available backups. On master this just calls slave listbackups via SSH
List available backups . On master this just calls slave listbackups via SSH
def list_backups(self):
        """List available backups. On master this just calls slave listbackups via SSH"""
        if self.is_master:
            self.remote_walmgr("listbackups")
        else:
            backups = self.get_backup_list(self.cf.getfile("full_backup"))
            if backups:
                print "\nList of backups:\n"
                print "%-15s %-24s %-11s %-24s" % \
                    ("Backup set", "Timestamp", "Label", "First WAL")
                print "%s %s %s %s" % (15*'-', 24*'-', 11*'-',24*'-')
                for backup in backups:
                    lbl = BackupLabel(backup)
                    print "%-15s %-24.24s %-11.11s %-24s" % \
                        (os.path.basename(backup), lbl.start_time,
                        lbl.label_string, lbl.first_wal)
                print
            else:
                print "\nNo backups found.\n"
def list_backups ( self ) : if self . is_master : self . remote_walmgr ( "listbackups" ) else : backups = self . get_backup_list ( self . cf . getfile ( "full_backup" ) ) if backups : print "\nList of backups:\n" print "%-15s %-24s %-11s %-24s" % ( "Backup set" , "Timestamp" , "Label" , "First WAL" ) print "%s %s %s %s" % ( 15 * '-' , 24 * '-' , 11 * '-' , 24 * '-' ) for backup in backups : lbl = BackupLabel ( backup ) print "%-15s %-24.24s %-11.11s %-24s" % ( os . path . basename ( backup ) , lbl . start_time , lbl . label_string , lbl . first_wal ) print else : print "\nNo backups found.\n"