@Override
  public int compareTo(BackupInfo o) {
    Long thisTS =
      Long.valueOf(this.getBackupId().substring(this.getBackupId().lastIndexOf("_") + 1));
    Long otherTS = Long.valueOf(o.getBackupId().substring(o.getBackupId().lastIndexOf("_") + 1));
    return thisTS.compareTo(otherTS);
  }
We use only time stamps to compare objects during sort operation
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java