Restic - commands list missing

What app is this about, and its version: Restic - Latest (now v0.18.0~ynh3)
What YunoHost version are you running: Latest - v12.1.24
What type of hardware are you using: Raspberry Pi 3, 4+

Describe your issue

Hi, I managed to install Restic in my YNH server, I was able to do a backup of everything I needed through CLI using systemctl start restic but I couldn’t find the command to restore a backup (or part of it, as an app), neither I could make Yunohost recognize that Restic backup.

In the Admin Doc there’re command to do the backup and to check those, but not to restore them.

Is there any list of commands that can be used with Restic installed on Yunohost?

Share relevant logs or error messages

no logs

Currently the Restic YunoHost package only automates the backup process, not the restoring process. I’d love to integrate a way to restore backups (or at least document it properly) but I have very limited time.

First, see Restic documentation : Restoring from backup — restic 0.18.0-dev documentation

Here are some commands to help you:
In this example I want to restore app roundcube

eval $(ssh-agent -s) # Start SSH agent
ssh-add /root/.ssh/id_restic_ed25519 # Add SSH key to agent, Restic will use it
RESTIC_REPOSITORY=$(yunohost app setting restic repository) # Save repository address in a variable
sftp -i /root/.ssh/id_restic_ed25519 user@domain # Connect to your backup server and use `ls` to list directories, `exit` to exit)
/var/www/restic/restic -r "$RESTIC_REPOSITORY/auto_roundcube" ls latest # List files in backup
/var/www/restic/restic -r "$RESTIC_REPOSITORY/auto_roundcube" restore latest --target /tmp/restore-work # You'll copy all files of the latest backup

Then you need to put these files in a .tar archive, and move it in /home/yunohost.backup/archives. Restic has a command to restore directly to an archive but it takes forever :

/var/www/restic/restic -r "$RESTIC_REPOSITORY/auto_roundcube" dump latest / > restore.tar
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.