You've already forked proxmox-backup
add sshportal backup
This commit is contained in:
@@ -221,6 +221,22 @@ fi
|
||||
## end of gitea ##
|
||||
{% endif %}
|
||||
|
||||
{% if backup_sshportal_enabled is sameas true %}
|
||||
## sshportal ##
|
||||
backup_sshportal_db_path="{{ backup_sshportal_db_path | default('/var/lib/docker/volumes/sshportal__var_lib_sshportal/_data/sshportal.db') }}"
|
||||
backup_sshportal_ssh_host="{{ backup_sshportal_ssh_host | default('localhost') }}"
|
||||
backup_sshportal_ssh_port="{{ backup_sshportal_ssh_port | default('2222') }}"
|
||||
backup_sshportal_ssh_user="{{ backup_sshportal_ssh_user | default('admin') }}"
|
||||
backup_sshportal_ssh_key="{{ backup_sshportal_ssh_key | default('/opt/docker-compose/sshportal/ed25519_sshportal_admin') }}"
|
||||
|
||||
mkdir -p "$backup_dir/$today/sshportal"
|
||||
|
||||
/usr/bin/sqlite3 "$backup_sshportal_db_path" .dump > "$backup_dir/$today/sshportal/sshportal.sql.bkp"
|
||||
|
||||
/usr/bin/ssh -i "$backup_sshportal_ssh_key" -p "$backup_sshportal_ssh_port" -l "$backup_sshportal_ssh_user" "$backup_sshportal_ssh_host" config backup > "$backup_dir/$today/sshportal/backup.json"
|
||||
## end of sshportal ##
|
||||
{% endif %}
|
||||
|
||||
# purge old backups
|
||||
find $backup_dir -type d -ctime +$backup_local_retention -exec rm -rf {} \;
|
||||
|
||||
@@ -253,6 +269,9 @@ mariadb.pxar:$backup_dir/$today/mariadb \
|
||||
{% if backup_gitea_enabled is sameas true %}
|
||||
gitea.pxar:$backup_dir/$today/gitea \
|
||||
{% endif %}
|
||||
{% if backup_sshportal_enabled is sameas true %}
|
||||
sshportal.pxar:$backup_dir/$today/sshportal \
|
||||
{% endif %}
|
||||
--rate ${PBS_RATE}
|
||||
## end of send to PBS ##
|
||||
|
||||
|
||||
Reference in New Issue
Block a user