minor script tweaks
This commit is contained in:
parent
ef79fcc730
commit
33b6b53008
1 changed files with 2 additions and 10 deletions
12
helperbot
12
helperbot
|
|
@ -376,9 +376,9 @@ function system_backup {
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# pull in any other common configs and secrets
|
# pull in any other common configs and secrets
|
||||||
echo "${blue}Pulling in other configurations...${normal}"
|
echo "${blue}Pulling in other configurations...${normal}"
|
||||||
mkdir -p $backup_working_directory/other/etc/caddy
|
mkdir -p $backup_working_directory/caddy
|
||||||
mkdir -p $backup_working_directory/other/etc/secrets
|
mkdir -p $backup_working_directory/other/etc/secrets
|
||||||
cp /etc/caddy/Caddyfile $backup_working_directory/other/etc/caddy/Caddyfile
|
cp -r $backup_local_folder/caddy $backup_working_directory/caddy
|
||||||
cp -r /etc/secrets/* $backup_working_directory/other/etc/secrets/
|
cp -r /etc/secrets/* $backup_working_directory/other/etc/secrets/
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# archive and compress everything
|
# archive and compress everything
|
||||||
|
|
@ -394,10 +394,6 @@ function system_backup {
|
||||||
# cleanup
|
# cleanup
|
||||||
echo "${blue}Cleaning up...${normal}"
|
echo "${blue}Cleaning up...${normal}"
|
||||||
rm -fr ${backup_working_directory}/${backup_output_tar}.zst $backup_working_directory/*
|
rm -fr ${backup_working_directory}/${backup_output_tar}.zst $backup_working_directory/*
|
||||||
# =============================================================================
|
|
||||||
# unload secrets - we already unload them for each vacuum/upload step, but we want to ensure they are
|
|
||||||
unset $(grep -v '^#' /etc/secrets/b2.env | sed -E 's/(.*)=.*/\1/' | xargs)
|
|
||||||
unset $(grep -v '^#' /etc/secrets/postgres.env | sed -E 's/(.*)=.*/\1/' | xargs)
|
|
||||||
elif [ "$synth_current_system" = "neptunium" ]; then # neptunium
|
elif [ "$synth_current_system" = "neptunium" ]; then # neptunium
|
||||||
# variables - could probably be set locally but unsure how much this will dynamically change between systems
|
# variables - could probably be set locally but unsure how much this will dynamically change between systems
|
||||||
backup_local_folder=/srv/docker
|
backup_local_folder=/srv/docker
|
||||||
|
|
@ -516,10 +512,6 @@ function system_backup {
|
||||||
# cleanup
|
# cleanup
|
||||||
echo "${blue}Cleaning up...${normal}"
|
echo "${blue}Cleaning up...${normal}"
|
||||||
rm -fr ${backup_working_directory}/${backup_output_tar}.zst $backup_working_directory/*
|
rm -fr ${backup_working_directory}/${backup_output_tar}.zst $backup_working_directory/*
|
||||||
# =============================================================================
|
|
||||||
# unload secrets - we already unload them for each vacuum/upload step, but we want to ensure they are
|
|
||||||
unset $(grep -v '^#' /etc/secrets/b2.env | sed -E 's/(.*)=.*/\1/' | xargs)
|
|
||||||
unset $(grep -v '^#' /etc/secrets/postgres.env | sed -E 's/(.*)=.*/\1/' | xargs)
|
|
||||||
elif [ "$synth_current_system" = "cerium" ]; then # cerium
|
elif [ "$synth_current_system" = "cerium" ]; then # cerium
|
||||||
postgres_vacuum_self
|
postgres_vacuum_self
|
||||||
elif [ "$synth_current_system" = "synthnix" ]; then # synthnix
|
elif [ "$synth_current_system" = "synthnix" ]; then # synthnix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue