Restore refused because the archive is bigger than home partition

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.1.18
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

I have a yunohost instance that I would like to move to a new server. One key reason for this move is to have better partitioning (to prevent greedy users from breaking the whole system).

To make this move, I thought the easiest would be to make a full backup on old server, install a fresh yunohost on new server and restore the backup. But the restore command fails with this error:

Error: Not enough space (space: 64599695360 B, needed space: 71516405367 B, security margin: 104857600 B)

It seems the available space seen by the command is only the space available on home partition (maybe because that’s where the backup folder is?):

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       25G  2.2G   22G  10% /
/dev/xvdb        64G  368K   61G   1% /home
/dev/xvda15     124M   11M  114M   9% /boot/efi
/dev/xvdd        15G  713M   14G   6% /var
/dev/xvde       4.9G  559M  4.1G  12% /var/log
/dev/xvdc        20G  684K   19G   1% /var/mail
/dev/xvdf        74G   67G  2.8G  97% /media/initial_backup

The 67G archive is on a temporary volume mounted on /media/initial_backup and symlinked from the backup folder. As you can see, there is enough space on the overall system, but not enough in home folder. I made the partition sizes according to what was used on the old server (with some margin), so I know there is enough space on each partition.

Is there a way to bypass this check? Someone asked a similar question on another post, but that specific question didn’t get an answer. I saw there is a --force option, but seems to be for another purpose.

if you still have yunohost on old server, backup each app one by one and backup system settings all one by one, then restore store each one /… one by one.

Thank you for the suggestion.I guess it would work and I will resort to this if I don’t find any other solution. But this is really not ideal, because it requires being around for the whole time of the process (the backup lasts 3h30, the copy to new server 1h30, and restore I don’t know yet…), or scripting the list of steps.

I tried 2 other solutions so far, which didn’t work:

  • I modified the code of yunohost command to skip the disk space check. But to my surprise the home partition got full before the restore could start, because yunohost tried first to extract the whole archive in /home/yunohost.backup/tmp, which of course didn’t fit. I suspect this is undesired, because from what I read in the code the archive file should be mounted rather than extracted. Maybe because the archive is on a separate partition? Does anyone know if this is a bug or a known restriction?

  • To avoid the problem of first solution, I tried to create a backup with the copy method instead of tar, but then I realised the restore command is not able to process a backup created with the copy method??? Why have a copy method then?

I hope someone can enlighten me :slight_smile:

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