spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.76k stars 1.03k forks source link

SSH Port for Borg Backup #3527

Open gitayam opened 6 days ago

gitayam commented 6 days ago

For different reasons SSH ports are not always on 22 , being able to configure borg to backup to a server with a custom ssh port is helpful and expands accessibility.

Solution would include: Adding documentation to have a user log into the matrix server to manually configure the ssh config

nano ~/.ssh/config

#Add in the the ssh port and ip
Host backup-server
    HostName ip.ip.ip.ip
    Port ###
    User root

and or the solution of allowing the ssh port to be configured in the ansible var yml

backup_borg_ssh_port: ###
backup_borg_location_repositories:
 - ssh://backup-server/Backups/Matrix/Path/

This is the documentation for configuring borg which would need to be updated https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/1666d1a1ff760fa371d43c83c0eace0af6531e7a/docs/configuring-playbook-backup-borg.md?plain=1#L42

aine-etke commented 5 days ago

You may find useful checking role vars: https://github.com/mother-of-all-self-hosting/ansible-role-backup_borg/blob/main/defaults/main.yml#L95

It would be great if you could send PR with docs updates :wink:

sarah4d2 commented 2 days ago

Setting a custom SSH port in vars.yml is already possible like this:

backup_borg_location_repositories:
  - ssh://USER@HOST:PORT/path/to/repo