Error Restoring Backup
Error Restoring Backup
I recently upgraded my server to Ubuntu 16.04 LTS (64-bit)
I'm trying to restore my backup like this:
I get this error:
Using latest VestaCP (0.9.8)
Edit: I think I posted this in the wrong section. If so, feel free to move it to the CLI section.
I'm trying to restore my backup like this:
Code: Select all
sudo bash /usr/local/vesta/bin/v-restore-user admin home/backup/admin.2017-02-13.tar
Code: Select all
Error: invalid backup format :: home/backup/admin.2017-02-13.tar
Edit: I think I posted this in the wrong section. If so, feel free to move it to the CLI section.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Error Restoring Backup
unfortunately this happens because of different gzip compression algorithms used between different software/OS versions... to the best of my guess and as skurudo also said in other threads.
there is no simple way to fix this, you'll need to "Extract" the backup archive and restore files one by one.
If the number of domains is many, you can script the User/Domain creation using CLI and then move the site folders in appropriate place, then restoring DBs.
there is no simple way to fix this, you'll need to "Extract" the backup archive and restore files one by one.
If the number of domains is many, you can script the User/Domain creation using CLI and then move the site folders in appropriate place, then restoring DBs.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: Error Restoring Backup
Can you try this command:
sudo bash /usr/local/vesta/bin/v-restore-user admin admin.2017-02-13.tar
sudo bash /usr/local/vesta/bin/v-restore-user admin admin.2017-02-13.tar
Re: Error Restoring Backup
That gives me:tjebbeke wrote:Can you try this command:
sudo bash /usr/local/vesta/bin/v-restore-user admin admin.2017-02-13.tar
Code: Select all
Error: backup admin.2017-02-13.tar doesn't exist
Re: Error Restoring Backup
Strangely, doing:
Also gives me:
Sort of like it thinks the file exists (even though it doesn't).
It appears that the command is having trouble "finding" the backup file, no matter what I do.
Code: Select all
sudo bash /usr/local/vesta/bin/v-restore-user admin /home/backup/SomeNonExistingFileHere.tar
Code: Select all
Error: invalid backup format
It appears that the command is having trouble "finding" the backup file, no matter what I do.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Error Restoring Backup
Interesting find... I'd like to watch how this thread goes. I've had this problem ever since I started using vesta :lol:vectorman wrote:Strangely, doing:
Also gives me:Code: Select all
sudo bash /usr/local/vesta/bin/v-restore-user admin /home/backup/SomeNonExistingFileHere.tar
Sort of like it thinks the file exists (even though it doesn't).Code: Select all
Error: invalid backup format
It appears that the command is having trouble "finding" the backup file, no matter what I do.
Re: Error Restoring Backup
Try
then run your comand
If fail try run whit bash -x
Code: Select all
cd /home/backup
Code: Select all
v-restore-user-backup admin backup-file.tar.gz
Re: Error Restoring Backup
I took your advice on running with the -x switch like this (from inside the backup folder):skamasle wrote:Try
then run your comandCode: Select all
cd /home/backup
If fail try run whit bash -xCode: Select all
v-restore-user-backup admin backup-file.tar.gz
Code: Select all
sudo bash -x /usr/local/vesta/bin/v-restore-user admin admin.2017-02-13.tar
Code: Select all
++ PROXY_PORT=80
++ PROXY_SSL_PORT=443
++ STATS_SYSTEM=webalizer,awstats
++ FTP_SYSTEM=vsftpd
++ DNS_SYSTEM=
++ MAIL_SYSTEM=
++ IMAP_SYSTEM=
++ CRON_SYSTEM=cron
++ FIREWALL_SYSTEM=iptables
++ FIREWALL_EXTENSION=fail2ban
++ BACKUP_SYSTEM=local
++ LANGUAGE=en
++ VERSION=0.9.8
++ DB_SYSTEM=mysql
+ args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
+ check_args 2 2 'USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
+ '[' 2 -gt 2 ']'
+ is_format_valid user backup
+ for arg_name in '$*'
+ eval 'arg=$user'
++ arg=admin
+ '[' '!' -z admin ']'
+ case $arg_name in
+ is_user_format_valid admin user
+ '[' 5 -eq 1 ']'
+ [[ admin =~ ^[[:alnum:]][-|.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
+ for arg_name in '$*'
+ eval 'arg=$backup'
++ arg=admin.2017-02-13.tar
+ '[' '!' -z admin.2017-02-13.tar ']'
+ case $arg_name in
+ is_user_format_valid admin.2017-02-13.tar backup
+ '[' 20 -eq 1 ']'
+ [[ admin.2017-02-13.tar =~ ^[[:alnum:]][-|.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
+ is_backup_available admin admin.2017-02-13.tar
+ [[ admin.2017-02-13.tar =~ ^admin.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]
+ '[' '!' -e /backup/admin.2017-02-13.tar ']'
+ [[ local =~ google ]]
+ [[ local =~ sftp ]]
+ [[ local =~ ftp ]]
+ '[' -z '' ']'
+ check_result 3 'backup admin.2017-02-13.tar doesn'\''t exist'
+ '[' 3 -ne 0 ']'
+ echo 'Error: backup admin.2017-02-13.tar doesn'\''t exist'
Error: backup admin.2017-02-13.tar doesn't exist
+ '[' '!' -z '' ']'
+ log_event 3 ' '\''admin'\'' '\''admin.2017-02-13.tar'\'''
+ '[' -z '' ']'
++ date '+%F %T'
++ basename /usr/local/vesta/bin/v-restore-user
+ LOG_TIME='2017-02-14 09:11:34 v-restore-user'
+ '[' 3 -eq 0 ']'
+ echo '2017-02-14 09:11:34 v-restore-user '\''admin'\'' '\''admin.2017-02-13.tar'\'' [Error 3]'
+ exit 3
ubuntu@example:/home/backup$ cls
No command 'cls' found, but there are 18 similar ones
cls: command not found
ubuntu@example:/home/backup$ clear
ubuntu@example:/home/backup$ sudo bash -x /usr/local/vesta/bin/v-restore-user admin admin.2017-02-13.tar
+ source /etc/profile
++ '[' '' ']'
++ '[' -d /etc/profile.d ']'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/apps-bin-path.sh ']'
++ . /etc/profile.d/apps-bin-path.sh
+++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/bash_completion.sh ']'
++ . /etc/profile.d/bash_completion.sh
+++ '[' -n '4.3.46(1)-release' -a -n '' -a -z '' ']'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/cedilla-portuguese.sh ']'
++ . /etc/profile.d/cedilla-portuguese.sh
+++ '[' '' = pt -a en '!=' pt ']'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/vesta.sh ']'
++ . /etc/profile.d/vesta.sh
+++ export VESTA=/usr/local/vesta
+++ VESTA=/usr/local/vesta
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/Z97-byobu.sh ']'
++ . /etc/profile.d/Z97-byobu.sh
+++ '[' -r /usr/bin/byobu-launch ']'
+++ '[' '' = 0 ']'
+++ '[' '' = 1 ']'
+++ '[' -e /etc/byobu/autolaunch ']'
+++ '[' '' = byobu ']'
+++ '[' '' = byobu-screen ']'
+++ '[' '' = byobu-tmux ']'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/Z99-cloud-locale-test.sh ']'
++ . /etc/profile.d/Z99-cloud-locale-test.sh
+++ '[' -f /root/.cloud-locale-test.skip -o -f /var/lib/cloud/instance/locale-check.skip ']'
+++ locale_warn
+++ local bad_names= bad_lcs= key= val= var= vars= bad_kv=
+++ local w1 w2 w3 w4 remain
+++ '[' '' = zsh ']'
+++ read -r w1 w2 w3 w4 remain
+++ locale
+++ case "$w1" in
+++ key=LANG
+++ val=en_US.UTF-8
+++ val=en_US.UTF-8
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LANGUAGE
+++ val=
+++ val=
+++ val=
+++ vars=' LANG=en_US.UTF-8 LANGUAGE='
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_CTYPE
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_NUMERIC
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_TIME
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_COLLATE
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_MONETARY
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_MESSAGES
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_PAPER
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_NAME
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_ADDRESS
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_TELEPHONE
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_MEASUREMENT
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_IDENTIFICATION
+++ val='"en_US.UTF-8"'
+++ val='en_US.UTF-8"'
+++ val=en_US.UTF-8
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8'
+++ read -r w1 w2 w3 w4 remain
+++ case "$w1" in
+++ key=LC_ALL
+++ val=
+++ val=
+++ val=
+++ vars=' LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_ALL='
+++ read -r w1 w2 w3 w4 remain
+++ bad_lcs=
+++ bad_kv=
+++ '[' -n '' ']'
+++ return 0
+++ unset locale_warn
++ unset i
++ LS_COLORS=':di=00;33'
+ user=admin
+ backup=admin.2017-02-13.tar
+ web=
+ dns=
+ mail=
+ db=
+ cron=
+ udir=
+ notify=no
+ '[' -z '' ']'
+ BACKUP=/backup
+ source /usr/local/vesta/func/main.sh
++ HOMEDIR=/home
++ BACKUP=/backup
++ BACKUP_GZIP=9
++ BACKUP_DISK_LIMIT=95
++ BACKUP_LA_LIMIT=5
++ RRD_STEP=300
++ BIN=/usr/local/vesta/bin
++ USER_DATA=/usr/local/vesta/data/users/admin
++ WEBTPL=/usr/local/vesta/data/templates/web
++ DNSTPL=/usr/local/vesta/data/templates/dns
++ RRD=/usr/local/vesta/web/rrd
++ SENDMAIL=/usr/local/vesta/web/inc/mail-wrapper.php
++ OK=0
++ E_ARGS=1
++ E_INVALID=2
++ E_NOTEXIST=3
++ E_EXISTS=4
++ E_SUSPENDED=5
++ E_UNSUSPENDED=6
++ E_INUSE=7
++ E_LIMIT=8
++ E_PASSWORD=9
++ E_FORBIDEN=10
++ E_DISABLED=11
++ E_PARSING=12
++ E_DISK=13
++ E_LA=14
++ E_CONNECT=15
++ E_FTP=16
++ E_DB=17
++ E_RRD=18
++ E_UPDATE=19
++ E_RESTART=20
++ (( I=1 ))
++ (( I <= 2 ))
++ [[ '' != 1 ]]
+++ eval echo '$1'
++++ echo admin
++ ARGUMENTS=' '\''admin'\'''
++ (( I++ ))
++ (( I <= 2 ))
++ [[ '' != 2 ]]
+++ eval echo '$2'
++++ echo admin.2017-02-13.tar
++ ARGUMENTS=' '\''admin'\'' '\''admin.2017-02-13.tar'\'''
++ (( I++ ))
++ (( I <= 2 ))
+ source /usr/local/vesta/func/domain.sh
+ source /usr/local/vesta/func/ip.sh
+ source /usr/local/vesta/func/db.sh
+ source /usr/local/vesta/func/rebuild.sh
+ source /usr/local/vesta/conf/vesta.conf
++ WEB_SYSTEM=apache2
++ WEB_RGROUPS=www-data
++ WEB_PORT=8080
++ WEB_SSL_PORT=8443
++ WEB_SSL=mod_ssl
++ PROXY_SYSTEM=nginx
++ PROXY_PORT=80
++ PROXY_SSL_PORT=443
++ STATS_SYSTEM=webalizer,awstats
++ FTP_SYSTEM=vsftpd
++ DNS_SYSTEM=
++ MAIL_SYSTEM=
++ IMAP_SYSTEM=
++ CRON_SYSTEM=cron
++ FIREWALL_SYSTEM=iptables
++ FIREWALL_EXTENSION=fail2ban
++ BACKUP_SYSTEM=local
++ LANGUAGE=en
++ VERSION=0.9.8
++ DB_SYSTEM=mysql
+ args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
+ check_args 2 2 'USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
+ '[' 2 -gt 2 ']'
+ is_format_valid user backup
+ for arg_name in '$*'
+ eval 'arg=$user'
++ arg=admin
+ '[' '!' -z admin ']'
+ case $arg_name in
+ is_user_format_valid admin user
+ '[' 5 -eq 1 ']'
+ [[ admin =~ ^[[:alnum:]][-|.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
+ for arg_name in '$*'
+ eval 'arg=$backup'
++ arg=admin.2017-02-13.tar
+ '[' '!' -z admin.2017-02-13.tar ']'
+ case $arg_name in
+ is_user_format_valid admin.2017-02-13.tar backup
+ '[' 20 -eq 1 ']'
+ [[ admin.2017-02-13.tar =~ ^[[:alnum:]][-|.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
+ is_backup_available admin admin.2017-02-13.tar
+ [[ admin.2017-02-13.tar =~ ^admin.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]
+ '[' '!' -e /backup/admin.2017-02-13.tar ']'
+ [[ local =~ google ]]
+ [[ local =~ sftp ]]
+ [[ local =~ ftp ]]
+ '[' -z '' ']'
+ check_result 3 'backup admin.2017-02-13.tar doesn'\''t exist'
+ '[' 3 -ne 0 ']'
+ echo 'Error: backup admin.2017-02-13.tar doesn'\''t exist'
Error: backup admin.2017-02-13.tar doesn't exist
+ '[' '!' -z '' ']'
+ log_event 3 ' '\''admin'\'' '\''admin.2017-02-13.tar'\'''
+ '[' -z '' ']'
++ date '+%F %T'
++ basename /usr/local/vesta/bin/v-restore-user
+ LOG_TIME='2017-02-14 09:12:21 v-restore-user'
+ '[' 3 -eq 0 ']'
+ echo '2017-02-14 09:12:21 v-restore-user '\''admin'\'' '\''admin.2017-02-13.tar'\'' [Error 3]'
+ exit 3
Re: Error Restoring Backup
I think you miss symlink from /home/backup > /backup
So you need move your backup file into /backup
And it should work fine
Check ls -la /home
If /home/backup is a dir move it content to /backup then make a symlink to point /home/backup to /backup
This will resolve all your problems
If not modify vesta configuration to take as default backup dir = /home/backup
So you need move your backup file into /backup
And it should work fine
Check ls -la /home
If /home/backup is a dir move it content to /backup then make a symlink to point /home/backup to /backup
This will resolve all your problems
If not modify vesta configuration to take as default backup dir = /home/backup
Re: Error Restoring Backup
I created a symbolic link like you suggested and then restored while in /backup. That did the trick! Thank you!skamasle wrote:I think you miss symlink from /home/backup > /backup
So you need move your backup file into /backup
And it should work fine
Check ls -la /home
If /home/backup is a dir move it content to /backup then make a symlink to point /home/backup to /backup
This will resolve all your problems
If not modify vesta configuration to take as default backup dir = /home/backup