mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-07 21:44:47 +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
|
||||
|
||||
# Script ver 2024110401
|
||||
# Script ver 2025022301
|
||||
|
||||
#TODO: blockcommit removes current snapshots, even if not done by cube
|
||||
# - it's interesting to make housekeeping, let's make this an option
|
||||
|
@ -140,9 +140,9 @@ function run_backup {
|
|||
# Prepare config file
|
||||
rm -f "${NPBACKUP_CONF_FILE}"
|
||||
cp "${NPBACKUP_CONF_FILE_TEMPLATE}" "${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%### VM ###%${vm}%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%___VM___%${vm}%g" "${NPBACKUP_CONF_FILE}"
|
||||
|
||||
"${NPBACKUP_EXECUTABLE}" --config-file "${NPBACKUP_CONF_FILE}" --backup --force >> "$LOG_FILE" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
@ -5,11 +5,11 @@ repos:
|
|||
repo_group: default_group
|
||||
backup_opts:
|
||||
paths:
|
||||
- ### SOURCE ###
|
||||
- ___SOURCE___
|
||||
source_type: files_from_verbatim
|
||||
exclude_files_larger_than: 0.0 KiB
|
||||
tags:
|
||||
- ### VM ###
|
||||
- ___VM___
|
||||
repo_opts:
|
||||
repo_password:
|
||||
retention_policy: {}
|
||||
|
@ -66,7 +66,7 @@ groups:
|
|||
keep_within: true
|
||||
ntp_server:
|
||||
prometheus:
|
||||
backup_job: ### VM ###
|
||||
backup_job: ___VM___
|
||||
group: ${MACHINE_GROUP}
|
||||
env:
|
||||
env_variables: {}
|
||||
|
@ -77,12 +77,12 @@ identity:
|
|||
machine_group: SOME_ARBITRARY_GROUP_NAME
|
||||
global_prometheus:
|
||||
metrics: false
|
||||
instance: ### VM ###
|
||||
instance: ___VM___
|
||||
destination:
|
||||
http_username:
|
||||
http_password:
|
||||
additional_labels:
|
||||
npf_tenant: ### TENANT ###
|
||||
npf_tenant: ___TENANT___
|
||||
backup_type: vm
|
||||
no_cert_verify: true
|
||||
global_options:
|
||||
|
|
Loading…
Add table
Reference in a new issue