backup_database#
- ADR.backup_database(output_directory: str | Path = '.', *, database: str = 'default', compress: bool = False, ignore_primary_keys: bool = False) None#
Create a JSON (optionally gzipped) backup of an ADR database.
- Parameters:
- output_directory
strorPath, default: “.” Directory in which to place the backup file.
- database
str, default: “default” ADR database alias to back up.
- compressbool, default:
False If
True, write a.json.gzfile instead of plain JSON.- ignore_primary_keysbool, default:
False If
True, use--natural-primaryto ignore primary key values and rely on natural keys instead.
- output_directory
- Raises:
ADRExceptionIf in-memory mode is active, the target DB is not configured, the output directory is invalid, or the backup command fails.