def _restore_backup(self):
        """Restore the specified database."""
        self.logger.info("Restoring backup for database: %s", self.database['NAME'])
        if self.path:
            input_filename = self.path
            input_file = self.read_local_file(self.path)
        else:
            if self.filename:
                input_filename = self.filename
            # Fetch the latest backup if filepath not specified
            else:
                self.logger.info("Finding latest backup")
                try:
                    input_filename = self.storage.get_latest_backup(encrypted=self.decrypt,
                                                                    compressed=self.uncompress)
                except StorageError as err:
                    raise CommandError(err.args[0])
            input_file = self.storage.read_file(input_filename)

        self.logger.info(input_filename % "Restoring: %s")
        if self.decrypt:
            unencrypted_file, input_filename = utils.unencrypt_file(input_file, input_filename,
                                                                    self.passphrase)
            input_file.close()
            input_file = unencrypted_file
        if self.uncompress:
            uncompressed_file, input_filename = utils.uncompress_file(input_file, input_filename)
            input_file.close()
            input_file = uncompressed_file
        self.logger.info("Restore tempfile created: %s", utils.handle_size(input_file))
        if self.interactive:
            answer = input("Are you sure you want to continue? [Y/n]")
            if answer.lower().startswith('n'):
                self.logger.info("Quitting")
                sys.exit(0)
        input_file.seek(0)
        self.dbcommands.run_restore_commands(input_file)

    # TODO: Remove this
dataset/ETHPy150Open django-dbbackup/django-dbbackup/dbbackup/management/commands/dbrestore.py/Command._restore_backup/swapped operands of `%`