Issue restoring with symlinked backup folder


I’m trying to restore a site onto a different server. The /backup folder is symlink to volume storage on the mnt drive:

backup → /mnt/backups

The issue seems to come from v-extract-fs-archive:

# Checking source path
rpath=$(readlink -f "$src_file")
if [ -z "$(echo $rpath | egrep "^/tmp|^$homedir|^$BACKUP/$user\.|^$BACKUP/tmp\.")" ]; then
     echo "Error: invalid source path $src_file in $rpath"
     exit 2

The problem seems to be that readlink comes back with the mounted path, not the symlink folder its being run in:

readlink -f /backup/tmp.sUKdEAM9Yf/mail/

Unfortunately having the backups in /backup isn’t really an option for me, as we’re on a limited amount of SSD (and the backups don’t need fast access. Any suggestions on what to try? Obviously I could tweak the code:

if [ -z "$(echo $rpath | egrep "^/tmp|^$homedir|^$BACKUP/$user\.|^$BACKUP/tmp\.|/mnt/backups/tmp")" ]; then

But that would break on future updates.

Mount /backup in a new partition or disk
Or use s3 storage

1 Like

This should work fine

1 Like

Unfortunatly it doesn’t

v-restore-user clickpress clickpress.2023-04-15_05-36-55.tar

– WEB –
2023-04-17 14:49:25

– MAIL –
2023-04-17 14:49:31
Error: invalid source path /backup/tmp.IkuhiOn7Hw/mail/
Error: Can’t unpack mail account container

I did some debugging, and it was this that was failing:

/usr/local/hestia/bin/v-extract-fs-archive “clickpress” “/backup/tmp.sUKdEAM9Yf/mail/” “/home/clickpress/mail/”
Error: invalid source path /backup/tmp.sUKdEAM9Yf/mail/

Even though the symlink folder I was in was showing as /backup:


The readlink shows the final path, which doesn’t get recognised as a valid path

Symlinking is not possible it need mounted as the drive…


Hmmm how do I do that? Its Linode “block storage”:

Basically it creates the storage (of the server), and then you mount that storage to the machine. Are you suggesting that when I mount it, instead of putting /mnt/backups , I tell it to mount directly to /backups ?



Yes that should work

1 Like

ok thanks - I will give that a go tomorrow :slight_smile:

1 Like

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