Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore broken ncp-restore MariaDB Dump 999999 sandbox invalid command / at line 1 #2029

Open
marco-aa opened this issue Jan 18, 2025 · 0 comments

Comments

@marco-aa
Copy link

Hello,

restoring my full ncp-backup from NextcloudPi 1.55.3 on arm32 bulleseye on NextcloudPi v1.55.3 -
v24.11.1 for Raspberry Pi 4 running Armbian Linux 6.6.63-current-bcm2711 stopped.

My files had been restored. The backup was broken while restoring db-dump with "... invalid command at line 1".

If found Compatibility Change the current Armbian with Bookworm is running mariadb 10.11.6-0+deb12u1, as wirtten in the link, the client does not know the 1st line "/999999.*sandbox", my old arm32 version had this security feature implemented, the version 10.11.6 is missing it.

My workaround was patching /usr/local/bin/ncp-restore with as suggested in the link comments.

sed -i '1{/999999.sandbox/d}' "$TEMPDIR"/nextcloud-sqlbkp_.bak

sed -i '1{/999999.*sandbox/d}' "$TEMPDIR"/nextcloud-sqlbkp_*.bak
mysql -u root nextcloud <  "$TEMPDIR"/nextcloud-sqlbkp_*.bak || { echo "Error restoring nextcloud database"; exit 1; }

## RESTORE DATADIR 

I'll leave this information here, if some one has the same problem. For me we can close this issue ;-)

I'm not sure (it's a rare case) if it's worth to be fixed.

@marco-aa marco-aa changed the title Restore broken ncp-restore MariaDB Dump 999999 sandbox invalid command 0 / at line 1 Restore broken ncp-restore MariaDB Dump 999999 sandbox invalid command / at line 1 Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant