BernieO / calcardbackup

calcardbackup: moved to https://codeberg.org/BernieO/calcardbackup
GNU Affero General Public License v3.0
69 stars 5 forks source link

Synology - ERROR: Nextcloud database is MySQL/MariaDB #24

Closed powerlocke-ctrl closed 4 years ago

powerlocke-ctrl commented 4 years ago

I've installed calcardbackup to my Synology NAS with installed Nextcloud in web-folder. After starting script I get this Error:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+  Sun Nov 24 18:51:27 CET 2019 --> START calcardbackup ver. 0.9.5-1 (25.09.2019), AGPL-3.0
+  Checking dependencies and preparing...
+  no usersfile given:
+     - will fetch all available items from database
+  Using URL: https://192.178.168.99/web
+  can't read status.php (cURL code '60').
+  Nextcloud 17.0.1 detected.
-- calcardbackup: ERROR --
-- ERROR: Nextcloud database is MySQL/MariaDB. Therefore this script requires package 'mysql-client' or 'mariadb-client'.
-- Install according package and run script again
-- calcardbackup: Exiting.

Ip Adresse is correct, backup folder has been created by script, but I have no idea, what I have to do now.

BernieO commented 4 years ago

The MySQL-Client is either not installed or not in $PATH. I suspect the latter one.

I don‘t have experience with Synology, but I had a quick look around and it looks like in a Synology-NAS the MySQL-client is installed under /usr/local/mariadb10/bin.

If you do get a proper version information after invoking

/usr/local/mariadb10/bin/mysql -V

you can add that directory to your $PATH and your problem will probably be solved. You’ll find plenty of information on how to do that if you search the internet for linux add dir to path.

Let me know if that worked for you.

powerlocke-ctrl commented 4 years ago

Hey Thansks for help. Following works: I've add a row into file "calcardbackup", with export PATH=$PATH:/usr/local/mariadb10/bin

Now I run sudo -u http ./calcardbackup "/volume1/web/nextcloud" and script backups all needed data.

Would it be possible to same with data from Bookmark-App.

Thanks and best regards! Unbenannt

BernieO commented 4 years ago

Cool - good to hear, you got it working.

I‘ve got another suggestion for you though, because modifying the script itself is a bit inconvenient: you have to edit it again and again after every new release of the script.
Additionally there is actually no need to export PATH in this case.

This should do the trick for you without adding a line to the script:

sudo -u http PATH="$PATH:/usr/local/mariadb10/bin" ./calcardbackup "/volume1/web/nextcloud"

Please do let me know, if that works for you. I might then add a note to the README for other Synology users.

EDIT:

Would it be possible to same with data from Bookmark-App.

I am sorry, calcardbackup is only designed as tool to backup calendar and contacts data. See #23

powerlocke-ctrl commented 4 years ago

Hi BernieO,

thanks for reply. Your tip is working, too. This will be easier to handle updates ;-)

Thanks for sharing this scripts with us!

BernieO commented 4 years ago

Your tip is working, too. This will be easier to handle updates ;-)

Thanks for testing this - I am sure there will be some Synology users who will appreciate it.

Added according section to both READMEs in 4e48f848eac83440fd166e1afcc23eec2de30ba4