mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-12 07:55:23 +08:00
Avoid unhappy YAML replacements in kvm script
This commit is contained in:
parent
432364b4c1
commit
6f38bb17c1
2 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Script ver 2024110401
|
# Script ver 2025022301
|
||||||
|
|
||||||
#TODO: blockcommit removes current snapshots, even if not done by cube
|
#TODO: blockcommit removes current snapshots, even if not done by cube
|
||||||
# - it's interesting to make housekeeping, let's make this an option
|
# - it's interesting to make housekeeping, let's make this an option
|
||||||
|
@ -140,9 +140,9 @@ function run_backup {
|
||||||
# Prepare config file
|
# Prepare config file
|
||||||
rm -f "${NPBACKUP_CONF_FILE}"
|
rm -f "${NPBACKUP_CONF_FILE}"
|
||||||
cp "${NPBACKUP_CONF_FILE_TEMPLATE}" "${NPBACKUP_CONF_FILE}"
|
cp "${NPBACKUP_CONF_FILE_TEMPLATE}" "${NPBACKUP_CONF_FILE}"
|
||||||
sed -i "s%### TENANT ###%${tenant}%g" "${NPBACKUP_CONF_FILE}"
|
sed -i "s%___TENANT___%${tenant}%g" "${NPBACKUP_CONF_FILE}"
|
||||||
sed -i "s%### SOURCE ###%${BACKUP_FILE_LIST}%g" "${NPBACKUP_CONF_FILE}"
|
sed -i "s%___SOURCE___%${BACKUP_FILE_LIST}%g" "${NPBACKUP_CONF_FILE}"
|
||||||
sed -i "s%### VM ###%${vm}%g" "${NPBACKUP_CONF_FILE}"
|
sed -i "s%___VM___%${vm}%g" "${NPBACKUP_CONF_FILE}"
|
||||||
|
|
||||||
"${NPBACKUP_EXECUTABLE}" --config-file "${NPBACKUP_CONF_FILE}" --backup --force >> "$LOG_FILE" 2>&1
|
"${NPBACKUP_EXECUTABLE}" --config-file "${NPBACKUP_CONF_FILE}" --backup --force >> "$LOG_FILE" 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
|
@ -5,11 +5,11 @@ repos:
|
||||||
repo_group: default_group
|
repo_group: default_group
|
||||||
backup_opts:
|
backup_opts:
|
||||||
paths:
|
paths:
|
||||||
- ### SOURCE ###
|
- ___SOURCE___
|
||||||
source_type: files_from_verbatim
|
source_type: files_from_verbatim
|
||||||
exclude_files_larger_than: 0.0 KiB
|
exclude_files_larger_than: 0.0 KiB
|
||||||
tags:
|
tags:
|
||||||
- ### VM ###
|
- ___VM___
|
||||||
repo_opts:
|
repo_opts:
|
||||||
repo_password:
|
repo_password:
|
||||||
retention_policy: {}
|
retention_policy: {}
|
||||||
|
@ -66,7 +66,7 @@ groups:
|
||||||
keep_within: true
|
keep_within: true
|
||||||
ntp_server:
|
ntp_server:
|
||||||
prometheus:
|
prometheus:
|
||||||
backup_job: ### VM ###
|
backup_job: ___VM___
|
||||||
group: ${MACHINE_GROUP}
|
group: ${MACHINE_GROUP}
|
||||||
env:
|
env:
|
||||||
env_variables: {}
|
env_variables: {}
|
||||||
|
@ -77,12 +77,12 @@ identity:
|
||||||
machine_group: SOME_ARBITRARY_GROUP_NAME
|
machine_group: SOME_ARBITRARY_GROUP_NAME
|
||||||
global_prometheus:
|
global_prometheus:
|
||||||
metrics: false
|
metrics: false
|
||||||
instance: ### VM ###
|
instance: ___VM___
|
||||||
destination:
|
destination:
|
||||||
http_username:
|
http_username:
|
||||||
http_password:
|
http_password:
|
||||||
additional_labels:
|
additional_labels:
|
||||||
npf_tenant: ### TENANT ###
|
npf_tenant: ___TENANT___
|
||||||
backup_type: vm
|
backup_type: vm
|
||||||
no_cert_verify: true
|
no_cert_verify: true
|
||||||
global_options:
|
global_options:
|
||||||
|
|
Loading…
Add table
Reference in a new issue