Retore with a Pi4

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: 4.1.7.2
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

Hi, I recently install yunohost on a pi4 and I am very surprised and happy of the perf of this tiny server and the ease of deploying with yunohost (big thanks !).
I am testing backup restore to validate this point before really replacing important cloud services.

I have a sd card of 64Gb for the boot and /.
I have a 5Tb hard drive for the data.
I have ohter 5Tb hard drives for backup once a week.

Backup of data is working well with :
rsync -Hauvh --stats --info=progress2 /media/HOME/ /media/Backup/

I would like to have regular backup of the yunohost sd card, ideally everyday and everytime I am updating the config.

I tested 3 methods and 2 failed :-/ +> The method which is working is to use rpi-clone:

→ I used dd to make an image of the sdcard on my external hdd.

  • backup work fine with :
    today=$(date +"%Y-%m-%d%H:%M:%S")
    file="/media/path/Backup MMC/my_snapshot$_today.gz"
    dd if=/dev/mmcblk0 | gzip > “$_file”
  • I got the prompt at the end (1h) stating the cmd ended successfully
  • I tried to restore with Etcher and it failed (I think it stated a spacement problem with blocks…?)
  • I tried with USBimage and it flashed only the boot partition (so 450Mo on 19Go)
    = I did not succeed to restore

→ I tried with the default backup system

  • made a full backup (core + app) on my externat drive
  • made a fresh install of yunohost on a new sdcard.
  • when installation ended, I restored from the local archive.
  • note that I was not able to follow exactly the guide:

Then, instead of yunohost tools postinstall you can run: yunohost backup restore

I follow the webui installation, maybe that explain my results.
= I had some trouble with the domain. During the install, yunohost asked me for a domain. I am using a ynh.fr and could not use my known domain with either option (I have a domain or I don’t have a domain). Some applications where displaying my real domain, some my fake one created for the restore installation.
= Jellyfin was broken. I though that I could maybe open the archive and copy files manually to fix it. I read the log and understood that there was a lot going on during the restore (no copy/paste, lot of complexe config)… I gave up

X> I haven’t tried the Archivist

X> I haven’t tried with Borg. Can I use it on a single config server ?

X> I haven’t tried Restic which have the status In Testing.

Sorry, it’s a long post but maybe it can also help other new yunohosters :wink:

Why don’t you simply use Yunohost’s default backup system ? You’ll then be able to transfer the file located in /home/yunohost.backup to your external drive and if needed simply transfer back the file to this folder if you need to restore

When restoring such a backup on a fresh install it will reinstall all apps, users and settings

I created a PR to support backup with borg on a local harddrive
I will try to find motivation to test this PR now.

This is what I did (using web admin>backup) . I though it was the archivist that added this menu, maybe I got confused. I edited my original post, thanks.
So doing what you suggest, my result is mixed because of sub domain and jellyfin.

Thanks :+1:

That’s because a dynDNS domain (those provided by Yunohost, ynh.fr, noho.st & nohost.me) is kind of “linked” to the instance and I think it isn’t included in the backup, you’ll have to ask on this forum the unlock (understand “cut the link and make it available to everyone”) of the domain before restoring the backup, else the server will not be authorized to change the IP of the dynDNS domain. That’s not a problem with domains you own… Because you own them :joy:

Yep, I will not have this problem with my domain :wink:
It seems the dyndns is included in the restore. I got the correct domain after restore with some exception.
I guess during the install, I should SSH instead of the webUI. But I didn’t find the manual procedure for installation of yunohost and switching to a full restore. The only mention is in the admin guide stating:

Then, instead of yunohost tools postinstall you can run: yunohost backup restore

Does anyone knows where I can find the process for manual install with full restore ?

Hum, you should be able to login using root user before the post install (if I remember well password is yunohost on preinstalled images) then use SFTP to copy the backup and use yunohost backup restore %args% instead of performing the postinstall (either from cli or webadmin)

In fact I never tried restoring a backup before postinstall :confused:

Hi @AerisOne, I did made a full restore from a fresh install, thanks for your guidance with ssh with yunohost as default password. Here is some code for archive on external drive:

lsblk
mkdir /media/HDD
mount /dev/sda1 /media/HDD
ln -s “/media/HDD/PATH/yunohost.backup” /home
yunohost backup restore 20210310-182839

The good news is : I don’t have problem with the domain now :tada:
The bad news is that Jellyfin still do not restore :joy:
The ugly : nextcloud also failed :rofl: !

Maybe I should post both results in differents support topics :thinking:

The default backup of yunohost seems like the best option (it is very light and granular), but I don’t know if I can trust it, or if I use it the right way ?
Anyone has better experience than me with full restore?

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