Wordpress: Recovery from backup not possible - ERROR at line 1: Unknown command '\-'

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.7
What app is this about: Wordpress

Describe your issue

Hello volunteers,

I have problems to understand what went wrong when I wanted to recover my wordpress instance after deleting it. Something may be wrong with the script or it is related to the migration maybe. Could someone have a look and help me with it? That would be awesome!
I created the backup while migrating to Yunohost 12.0.7.
BACKUP:
WordPress wordpress (449.20 MB)
Version 6.5~ynh1

Share relevant logs or error messages

https://paste.yunohost.org/raw/salebayaqa

I think you have a know issue with the db since mariadb have changed… like in this post Force Install YNH on debian 11 because backup - #3 by langer

You may do something like this connected on ssh and with the user root:

Perhaps you can first copy the backup file wordpress-pre-upgrade1.tar or wordpress-pre-upgrade2.tar in a folder wordpress-tar,

sudo -i
mkdir /root/wordpress-tar
cp -a /home/yunohost/backup.archives/wordpress-pre-upgrade1.tar /root/wordpress-tar

then extract the tar file

cd wordpress-tar
tar -xvf  wordpress-pre-upgrade1.tar  

edit the file and remove the first line ( should be something like /*!999999\- enable the sandbox mode */ )

nano wordpress-tar/apps/wordpress/backup/db.sql

with the editor nano on the cursor pointed to the line with /*!999999\- enable the sandbox mode */ you do Ctl + K to delete it and then Ctl + 0 to edit the changes Ctl + X to exit the editor

You can delete the file wordpress-pre-upgrade1.tar from the directory wordpress-tar

rm wordpress-tar/worpress-pre-upgrade1.tar

recreate the tar file

cd ..
$ tar -cf wordpress-pre-upgrade1.tar wordpress-tar

Then rename the original backup to keep it in secure place…

mv /home/yunohost.backup/archives/wordpress-pre-upgrade1.tar /home/yunohost.backup/archives/wordpress-pre-upgrade1.tar-ORI

and replace the new one edited on the folder archives

mv /root/wordpress-pre-upgrade1.tar /home/yunohost.backup/archives/

And try then restore the backup…

yunohost backup restore wordpress-pre-upgrade1.tar --apps

I think you can try these steps…

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.