provider
¶
Custom provider classes
Classes:
Attributes¶
Classes¶
CustomProvider
¶
CustomProvider(
container: Container,
compression: CompressionAlgorithm | None = None,
)
Backup provider constructor
Parameters:
-
(container¶Container) –Container object
-
(compression¶CompressionAlgorithm | None, default:None) –Compression algorithm
Methods:
-
dump–Dump database
-
restore–Restore database
-
is_backup_provider–Checks if container supports a backup provider
-
validate_file–Validate the generated file
-
trigger_webhook–Trigger webhook.
-
trigger_error_webhook–Triggers an error on the webhook.
codeis appended to the address. -
trigger_success_webhook–Triggers an success on the webhook.
-
get_dump_binary–Get the binary used to dump the backup.
-
get_dump_args–Arguments for the dump binary.
-
get_restore_binary–Get the binary used to restore the backup.
-
get_restore_args–Arguments for the restore binary.
-
get_container_env–Get environment variables from container.
-
binary_exists_in_container–Check if binary exists inside the container.
-
get_container_label–Get labels for container.
-
get_service_name–Get service name (only if started with docker compose).
Attributes:
-
default_dump_binary(str | None) –Default dump binary
-
default_dump_args(str | None) –Default dump binary arguments
-
default_restore_binary(str | None) –Default restore binary
-
default_restore_args(str | None) –Default restore binary arguments
-
min_file_size(int) –Maximum file size, used to validate the generated file
-
pattern(str | None) –Pattern which is checked in the dumped file
-
plain_file_extension(str) –File extenstion used for the dumped file
-
compression(CompressionAlgorithm | None) –Compression algorithm
-
container(Container) –Container object
-
name– -
dump_binary–
Attributes¶
default_dump_binary
class-attribute
instance-attribute
¶
Default dump binary
default_dump_args
class-attribute
instance-attribute
¶
Default dump binary arguments
default_restore_binary
class-attribute
instance-attribute
¶
Default restore binary
default_restore_args
class-attribute
instance-attribute
¶
Default restore binary arguments
min_file_size
class-attribute
instance-attribute
¶
Maximum file size, used to validate the generated file
pattern
class-attribute
instance-attribute
¶
Pattern which is checked in the dumped file
plain_file_extension
class-attribute
instance-attribute
¶
File extenstion used for the dumped file
compression
instance-attribute
¶
compression: CompressionAlgorithm | None = compression
Compression algorithm
Functions¶
trigger_webhook
¶
trigger_error_webhook
¶
Triggers an error on the webhook. code is appended to the address.
trigger_success_webhook
¶
Triggers an success on the webhook.
get_container_env
¶
Get environment variables from container.
binary_exists_in_container
¶
Check if binary exists inside the container.
get_container_label
¶
Get labels for container.
get_service_name
¶
Get service name (only if started with docker compose).