geonode.br.management.commands.restore

Attributes

logger

Classes

Command

Module Contents

geonode.br.management.commands.restore.logger[source]
class geonode.br.management.commands.restore.Command[source]

Bases: django.core.management.base.BaseCommand

help = 'Restore the GeoNode application data'[source]
add_arguments(parser)[source]
handle(**options)[source]
execute_restore(**options)[source]
validate_backup_file_options(**options) None[source]

Method validating –backup-file and –backup-files-dir options

Parameters:

options – self.handle() method options

Raises:

Django CommandError, if options violate requirements

Returns:

None

parse_backup_files_dir(backup_files_dir: str) str | None[source]

Method picking the Backup Archive to be restored from the Backup Files Directory. Only archives created/modified AFTER the last restored dumps are considered.

Parameters:

backup_files_dir – path to the directory containing backup files

Returns:

backup file path, if a proper backup archive was found, and None otherwise

validate_backup_file_hash(backup_file: str) str[source]

Method calculating the hash of the backup file and validating it if the proper *.md5 file exists in the backup_file directory.

Parameters:

backup_file – path to the backup_file

Returns:

backup_file hash

check_backup_ini_settings(backup_file: str) str[source]

Method checking backup file’s original settings availability

Parameters:

backup_file – path to the backup_file

Returns:

backup_ini_file_path original settings used by the backup file

restore_geoserver_backup(config, settings, target_folder, skip_geoserver_info, skip_geoserver_security, ignore_errors, soft_reset)[source]

Restore GeoServer Catalog

prepare_geoserver_gwc_config(config, settings)[source]
restore_geoserver_raster_data(config, settings, target_folder)[source]
restore_geoserver_vector_data(config, settings, target_folder, soft_reset)[source]

Restore Vectorial Data from DB

restore_geoserver_externals(config, settings, target_folder)[source]

Restore external references from XML files