OpenVZ Forum


Home » General » Support » vzrestore - Exit error 2 (unable to restore backup using vzrestore)
vzrestore - Exit error 2 [message #47387] Thu, 09 August 2012 09:08 Go to next message
michelkaeser
Messages: 5
Registered: August 2012
Junior Member
Hello everyone

I had some trouble with my server, so I decided to completely reinstall everything. I have set it up exactly the way it was before (same kernel etc.) and am now trying to restore a vzdump with no luck.

System
Debian Squeeze 64-bit
2.6.32-5-openvz-amd64
VZ packages latest version from official squeeze repos

When trying to restore I get this error:

INFO: restore openvz backup '/home/backup/vz/ve-dump.241.1344460623.tar' using ID 241
you choose to force overwriting VPS config file, private and root directories.
INFO: extracting archive '/home/backup/vz/ve-dump.241.1344460623.tar'
tar: write error
INFO: Total bytes read: 857856000 (819MiB, 55MiB/s)
INFO: extracting configuration to '/etc/vz/conf/241.conf'
INFO: sh: cannot open /var/lib/vz/private/241/etc/vzdump/vps.conf: No such file
ERROR: restore openvz backup '/home/backup/vz/ve-dump.241.1344460623.tar' failed - command 'sed -e 's/VE_ROOT=.*/VE_ROOT=\"\/var\/lib\/vz\/root\/$VEID\"/' -e 's/VE_PRIVATE=.*/VE_PRIVATE=\"\/var\/lib\/vz\/private\/$VEID\"/'  <'/var/lib/vz/private/241/etc/vzdump/vps.conf' >'/etc/vz/conf/241.conf'' failed with exit code 2


(that's with the --force param, just tried now) and without:

INFO: restore openvz backup '/home/backup/vz/ve-dump.241.1344460623.tar' using ID 241
INFO: extracting archive '/home/backup/vz/ve-dump.241.1344460623.tar'
tar: write error
INFO: Total bytes read: 857856000 (819MiB, 464MiB/s)
INFO: extracting configuration to '/etc/vz/conf/241.conf'
INFO: sh: cannot open /var/lib/vz/private/241/etc/vzdump/vps.conf: No such file
ERROR: restore openvz backup '/home/backup/vz/ve-dump.241.1344460623.tar' failed - command 'sed -e 's/VE_ROOT=.*/VE_ROOT=\"\/var\/lib\/vz\/root\/$VEID\"/' -e 's/VE_PRIVATE=.*/VE_PRIVATE=\"\/var\/lib\/vz\/private\/$VEID\"/'  <'/var/lib/vz/private/241/etc/vzdump/vps.conf' >'/etc/vz/conf/241.conf'' failed with exit code 2


What's the file "NFO: sh: cannot open /var/lib/vz/private/241/etc/vzdump/vps.conf: No such file" for? Does it need to be created within the structure of the HW node or within the container dump?

Any help would be really appreciated Smile

Regards
Re: vzrestore - Exit error 2 [message #47598 is a reply to message #47387] Fri, 17 August 2012 15:51 Go to previous messageGo to next message
cuantica is currently offline  cuantica
Messages: 2
Registered: August 2012
Location: Bogota
Junior Member
Can you extrat the tarball using tar command?

If so you can recreate/copy the conf file to /etc/vz/conf/ID.conf and move the files to /vz/private/ID where ID is your container number
Re: vzrestore - Exit error 2 [message #47599 is a reply to message #47598] Fri, 17 August 2012 19:29 Go to previous message
michelkaeser
Messages: 5
Registered: August 2012
Junior Member
Hi cuantica

I was able to solve the problem like this (since I'm using OVZ Web Panel):

- Create a new virtual machine
- Create a backup of this machine
- Replace the backup file with the one you want to restore
- Restore the backup (which got replaced)

I guess this is just the "GUId" version of your steps.

Thank you!
Previous Topic: Can not stop container
Next Topic: Access to /proc/drbd inside a container
Goto Forum:
  


Current Time: Sat Nov 09 02:45:51 GMT 2024

Total time taken to generate the page: 0.03630 seconds