Synchronize data Script
This script is designed to manage backups for various databases. It supports functionalities like downloading the latest backups, selecting daily/weekly/monthly backups, and restoring databases.
Link
You can find the script under Dev services repo . Follow this Gitlab link
Functions
print_help() :
parse_yaml() :
compose_file_exists() :
get_odoo_container_name(), get_db_container_name(), get_odoo_image(), get_odoo_hostname():
get_db_filename() :
db_supported() :
check_dependencies() :
set_backup_host() :
shutdown_odoo(), startup_odoo(), shutdown_db(), startup_db() :
db_available_on_bkh() :
choose_file() :
download_file() :
retrieve() :
wait_db_up() :
restore_db() :
gauge() :
alter_db() :
Usage
synchronize_data.sh [OPTION]
Options
-y : Get the latest backup.
-d : Only download the database backup.
-e : Only download the extra-addons backup.
-f : Only download the filestore backup.
-s : Select daily backups.
-w : Select weekly backups.
-m : Select monthly backups.
-x : Enable debug mode.
-h : Print the help message.
Example Commands
# Download the latest backup
./synchronize_data.sh -y
# Download only the database backup
./synchronize_data.sh -d
# Enable debug mode and select daily backups
./synchronize_data.sh -x -s
# Print help message
./synchronize_data.sh -h
— Nadir Habib 2024/06/05 12:21