Exemplo n.º 1
0
    def _load_db_contents(cls):
        if (not cls._in_place_upgrade_path
                or not os.path.exists(cls._in_place_upgrade_path)):
            return

        db_json_exim.DatabaseExim(
            '--import-from %s --cluster_id %s' %
            (cls._in_place_upgrade_path, cls._cluster_id)).db_import()
Exemplo n.º 2
0
    def _dump_db_contents(cls):
        if not cls._in_place_upgrade_path:
            return

        if not os.path.exists(os.path.dirname(cls._in_place_upgrade_path)):
            os.makedirs(os.path.dirname(cls._in_place_upgrade_path))
        db_json_exim.DatabaseExim(
            '--export-to %s --cluster_id %s' %
            (cls._in_place_upgrade_path, cls._cluster_id)).db_export()