mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 00:55:10 +00:00
custom backup dir path can be specified from now on
This commit is contained in:
parent
4d7ec83b4e
commit
39949bb7db
1 changed files with 42 additions and 34 deletions
10
.github/workflows/restore-site.yml
vendored
10
.github/workflows/restore-site.yml
vendored
|
|
@ -17,7 +17,11 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
backup_timestamp:
|
||||
description: 'Backup timestamp (e.g., 20260109_142920) - leave empty to use latest'
|
||||
description: '(Optional) Backup timestamp (e.g., 20260109_142920) - leave empty to use latest'
|
||||
required: false
|
||||
type: string
|
||||
absolute_backup_dir_path:
|
||||
description: '(Optional) Absolute path to the backup directory (the backup files contained in the directory should match the the following naming convention: <timestamp>-<site_name>-database.sql.gz, <timestamp>-<site_name>-files.tar, <timestamp>-<site_name>-private-files.tar.gz)'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
|
|
@ -126,6 +130,9 @@ jobs:
|
|||
cd ${{ env.DEPLOY_PATH }}
|
||||
|
||||
docker compose exec -T backend bash -c '
|
||||
if [ -n \"${{ github.event.inputs.absolute_backup_dir_path }}\" ]; then
|
||||
BACKUP_DIR=\"${{ github.event.inputs.absolute_backup_dir_path }}\"
|
||||
else
|
||||
# Check both possible archived locations
|
||||
if [ -d /home/frappe/frappe-bench/archived/sites ]; then
|
||||
ARCHIVED_BASE=/home/frappe/frappe-bench/archived/sites
|
||||
|
|
@ -165,6 +172,7 @@ jobs:
|
|||
fi
|
||||
|
||||
BACKUP_DIR=\"\$ARCHIVED_SITE/private/backups\"
|
||||
fi
|
||||
|
||||
if [ ! -d \"\$BACKUP_DIR\" ]; then
|
||||
echo \"ERROR: Backup directory not found: \$BACKUP_DIR\"
|
||||
|
|
|
|||
Loading…
Reference in a new issue