Error: invalid backup format Topic is solved
-
- Posts: 4
- Joined: Tue Aug 23, 2016 6:06 pm
Error: invalid backup format
Hello everyone,
We recently set up a vm web hosting server in order to prepare ourselves for taking down a physical server we have that has been having what seems like hardware issues.
The virtual server is set up with ubuntu, with vesta 0.9.8-17 installed. I copied over the backup tar files over from the old server to the new one, and placed them in the home/backup directory. When I try to use v-restore-user, I get an error saying "Error: invalid backup format ::" followed by the directory path describing the tar file I just tried to use.
I scoured the interwebs and these forums trying to find someone with a similar issue, but I have yet to find a similar situation. I tried:
We recently set up a vm web hosting server in order to prepare ourselves for taking down a physical server we have that has been having what seems like hardware issues.
The virtual server is set up with ubuntu, with vesta 0.9.8-17 installed. I copied over the backup tar files over from the old server to the new one, and placed them in the home/backup directory. When I try to use v-restore-user, I get an error saying "Error: invalid backup format ::" followed by the directory path describing the tar file I just tried to use.
I scoured the interwebs and these forums trying to find someone with a similar issue, but I have yet to find a similar situation. I tried:
- - Changing the permissions attributes of the backup folder, the individual tar files, as well as v-restore-user script
- Using a different tar file
- Restoring a different user
- Switching Active User
- Copying the permission layout of the old server's backup files to the new server
- Checking spelling on my commands
- Using grep to find the error message (we found a similar error message within other code, but could not identify the source of our error)
Re: Error: invalid backup format
I'm finding the same issue as well. Looks like the cuprit is the regular expression in the is_user_format_valid() function in func/main.sh. Line number 508:
Anyone know what needs to be fixed to make this work?
Code: Select all
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
Re: Error: invalid backup format
More background information: This issue seems to persist across both our VESTA servers.
Server 1:
Ubuntu 14.0.4
VESTA 0.9.8 - 16
Server 2:
Ubuntu 16.0.4
VESTA 0.9.8 - 17
If I do a CLI backup and restore I get the same error message on both machines.
I am following this process:
https://vestacp.com/docs/#how-to-migrat ... her-server
Server 1:
Ubuntu 14.0.4
VESTA 0.9.8 - 16
Server 2:
Ubuntu 16.0.4
VESTA 0.9.8 - 17
If I do a CLI backup and restore I get the same error message on both machines.
I am following this process:
https://vestacp.com/docs/#how-to-migrat ... her-server
Re: Error: invalid backup format
You may get error because you do something like this:
v-restore-user admin /backup/admin.ddddd.tar
You need enter to backup folder cd /backup and then run restore v-restore-user admin admin-dddddd.tar
If you run ubuntu 16 you need take care about this bug -> https://github.com/serghey-rodin/vesta/issues/959
v-restore-user admin /backup/admin.ddddd.tar
You need enter to backup folder cd /backup and then run restore v-restore-user admin admin-dddddd.tar
If you run ubuntu 16 you need take care about this bug -> https://github.com/serghey-rodin/vesta/issues/959
Re: Error: invalid backup format
Unfortunately neither of those resolved the issue for us :-( Interestingly enough the scheduled restore through the web GUI DOES work. But that doesn't help us since we are trying to migrate everything to a new server.
Re: Error: invalid backup format
So I did a little bit of manipulation to get SOME progress on this, but still don't have a resolution.
I created a symbolic link in /bin to point to /user/local/vesta/bin/v-restore-user. Then I could run the command without needing the full path in the /backup folder or the /home/backup folder. Now I get a permission denied error when running the command even after I chmod 777 the file and run as root:
Does anyone know what can be done to resolve this?
I created a symbolic link in /bin to point to /user/local/vesta/bin/v-restore-user. Then I could run the command without needing the full path in the /backup folder or the /home/backup folder. Now I get a permission denied error when running the command even after I chmod 777 the file and run as root:
Code: Select all
>v-restore-user user user.2016-12-07.tar
Error: permission denied
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Error: invalid backup format
As wich user are you running the command? Does the files have the correct permission? Normally you do not have to setup the symbolic link in /bin.
Re: Error: invalid backup format
Ubuntu uses dash as its default shell, whereas the c-* suite of binaries use bash.stiadmin wrote: >v-restore-user user user.2016-12-07.tar
Error: permission denied[/code]
Does anyone know what can be done to resolve this?
Try prefixing the v-restore-user command with bash from within the /backup/ directory, e.g.
Code: Select all
bash v-restore-user user user-2016-12-25.tar
You can also update the default shell from dash to bash.The issue is caused by dash interpreting the path to the /backup/ directory as being /backup/backup/.
-
- Posts: 12
- Joined: Wed Dec 28, 2016 8:08 pm
Re: Error: invalid backup format
I have this issue too:
Has there been a resolution to this?
Also I should note that this is a new install of VestaCp - thanks!
Code: Select all
root@cp:~# /usr/local/vesta/bin/v-restore-user dailycha dailychange.2016-12-29.tar
Error: permission denied
Also I should note that this is a new install of VestaCp - thanks!
-
- Posts: 12
- Joined: Wed Dec 28, 2016 8:08 pm
Re: Error: invalid backup format
It looks like the error might be coming from here:
v-restore-user:
But I'm not clear on what that is checking for. Is it permissions of the backup file?
Thanks!
v-restore-user:
Code: Select all
# Check backup ownership function
is_backup_available() {
if ! [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
check_result $E_FORBIDEN "permission denied"
fi
}
Thanks!