Restore turning symlinks into files

I've posted this in the forums at: https://www.virtualmin.com/node/33607, but have since licensed the server, so thought I'd try out the support system:

I've done this plenty of times and am not sure why I'm having an issue now

I'm moving a site from one server to another. Both servers are running centos 6.5. The 'old" server is running virtualmin 4.07, the new server 4.08.

I use the old server and create the backup file.

On the new server I use the restore to create the site there.

For some reason the symlinks in the backup are being turned into files during the restore, causing the restore to fail with :

Extracting TAR file of home directory .. .. TAR failed!

/bin/tar: ./public_html/Web: Cannot create symlink to `my-src-folder-here': File exists /bin/tar: Exiting with failure status due to previous errors

The backup file correctly has the symlink. I've verified by manually extracting it.

I can manually complete this transfer, but ideally would like to get to the bottom of it in case we run into it again. Any ideas?

Thank you

Simon

Status: 
Closed (fixed)

Comments

Thanks -- I did receive your backup file, and have been doing some testing on it.

I reached a point where I need Jamie's assistance.

Jamie is on vacation at the moment, whenever he gets back I was going to pick his brain about what might be going on there.

Ok cool, thanks.

I'll do a manual xfer for now, and hopefully (or not) we can reproduce it again later.

Simon

Oh I meant to say I can reproduce the problem when performing the restore using Virtualmin. But not when unpacking it manually, from the command line.

And that's where I need Jamie's assistance, something in the way Virtualmin is unpacking that archive seems to be triggering the issue you're seeing.

I'm back now actually - Eric, was this issue specific to this particular backup, or for any backups using symlinks?

So the underlying issue here is that the public HTML directory for this domain was set to a path that is a symlink, which breaks Virtualmin when restoring. We should really prevent this - I will fix that in the next release.

Until then, the work-around is as follows :

  1. Do a restore of the domain, which will fail
  2. Delete public_html/Web under the domain's home dir
  3. Try the restore again

Thanks very much.

I'm not 100% certain, but pretty sure I was able to do this in the past. I did a restore of the same site to a development server about 2 months ago.

We're good for now though, thanks for looking at it.

Simon

Automatically closed -- issue fixed for 2 weeks with no activity.