Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Error: invalid backup format Topic is solved

General questions about VestaCP
Post Reply
  • Print view
Advanced search
19 posts
  • 1
  • 2
  • Next
SampleTacoInundation
Posts: 4
Joined: Tue Aug 23, 2016 6:06 pm

Error: invalid backup format
  • Quote

Post by SampleTacoInundation » Wed Dec 07, 2016 5:45 pm

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:
  • - 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)
If anyone could help or offer any tips toward getting our users restored it would be greatly appreciated :)
Top

stiadmin
Posts: 10
Joined: Mon Mar 14, 2016 7:32 pm

Re: Error: invalid backup format
  • Quote

Post by stiadmin » Wed Dec 07, 2016 7:09 pm

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:

Code: Select all

 if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
Anyone know what needs to be fixed to make this work?
Top

stiadmin
Posts: 10
Joined: Mon Mar 14, 2016 7:32 pm

Re: Error: invalid backup format
  • Quote

Post by stiadmin » Wed Dec 07, 2016 8:10 pm

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
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Error: invalid backup format
  • Quote

Post by skamasle » Wed Dec 07, 2016 8:32 pm

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
Top

stiadmin
Posts: 10
Joined: Mon Mar 14, 2016 7:32 pm

Re: Error: invalid backup format
  • Quote

Post by stiadmin » Thu Dec 08, 2016 8:49 pm

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.
Top

stiadmin
Posts: 10
Joined: Mon Mar 14, 2016 7:32 pm

Re: Error: invalid backup format
  • Quote

Post by stiadmin » Sun Dec 11, 2016 1:55 pm

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:

Code: Select all

>v-restore-user user user.2016-12-07.tar
Error: permission denied
Does anyone know what can be done to resolve this?
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Error: invalid backup format
  • Quote

Post by tjebbeke » Mon Dec 19, 2016 11:01 am

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.
Top

twoup
Posts: 8
Joined: Wed Dec 28, 2016 9:24 pm

Re: Error: invalid backup format
  • Quote

Post by twoup » Wed Dec 28, 2016 9:30 pm

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?
Ubuntu uses dash as its default shell, whereas the c-* suite of binaries use bash.

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/.
Top

retronoodle
Posts: 12
Joined: Wed Dec 28, 2016 8:08 pm

Re: Error: invalid backup format
  • Quote

Post by retronoodle » Thu Dec 29, 2016 7:00 pm

I have this issue too:

Code: Select all

root@cp:~# /usr/local/vesta/bin/v-restore-user dailycha dailychange.2016-12-29.tar
Error: permission denied
Has there been a resolution to this?

Also I should note that this is a new install of VestaCp - thanks!
Top

retronoodle
Posts: 12
Joined: Wed Dec 28, 2016 8:08 pm

Re: Error: invalid backup format
  • Quote

Post by retronoodle » Thu Dec 29, 2016 7:07 pm

It looks like the error might be coming from here:

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
}

But I'm not clear on what that is checking for. Is it permissions of the backup file?

Thanks!
Top


Post Reply
  • Print view

19 posts
  • 1
  • 2
  • Next

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password