def METHOD_NAME(self, *args, **options):
    try:
        server.get_status()
        self.stderr.write(
            self.style.ERROR(
                "Cannot restore while Kolibri is running, please run:\n"
                "\n"
                "    kolibri stop\n"
            )
        )
        raise SystemExit()
    except server.NotRunning:
        # Great, it's not running!
        pass
    latest = options["latest"]
    select = options["select"]
    use_backup = options.get("dump_file", None)
    logger.info("Beginning database restore")
    search_root = default_backup_folder()
    if latest:
        use_backup = self.fetch_latest(search_root)
    elif select:
        use_backup = self.select_backup(search_root)
    logger.info("Using backup file: {}".format(use_backup))
    if not os.path.isfile(use_backup):
        raise CommandError("Couldn't find: {}".format(use_backup))
    dbrestore(use_backup)
    self.stdout.write(
        self.style.SUCCESS("Restored database from: {path}".format(path=use_backup))
    )