Skip to content

[enh] Backup: refactor, and add borg method#2231

Open
kay0u wants to merge 18 commits intodevfrom
enh/backup
Open

[enh] Backup: refactor, and add borg method#2231
kay0u wants to merge 18 commits intodevfrom
enh/backup

Conversation

@kay0u
Copy link
Copy Markdown
Member

@kay0u kay0u commented Nov 19, 2025

The problem

...

Solution

  • Move some logic to BackupMethod subclasses
  • Add BorgBackupMethod

PR Status

Kind of tested, with tar and borg (only with a localhost repo for now)
There is no unit tests yet
We should use BORG_FILES_CACHE_SUFFIX, as it's done in borg_ynh app

How to test

yunohost settings set misc.backup.default_backup_method -v borg
yunohost backup create --debug

# You can start some borg commands too with:
borg list /home/yunohost.backup/archives/borg::20251118-231311 # With the ID of the backup

yunohost backup list

yunohost backup info 20251118-231311

yunohost backup restore 20251118-231311 --apps

We can set a remote repo with something like that:

yunohost settings set misc.backup.borg.repository_path -v "user@backup-server:/backups/yunohost"
yunohost settings set misc.backup.borg.rsh -v "ssh -i /root/.ssh/backup_key"
yunohost settings set misc.backup.borg.passphrase -v "mon_super_mot_de_passe"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant