Calcardbackup: bash script to backup Nextcloud calendars and addressbooks as *.ics/*.vcf files

I can‘t see that, but you said, that the script is pulling data from the running instance and my script is using the credentials from config.php, so obviously your config.php is pointing to the database of your new installation.

Good you have a database dump. It should be not a big problem to restore the calendars. Replace [DBPASSWORD] with the according value in config.php from your old installation and make sure that there is no space between -p and [DBPASSWORD]:

  1. create a new database (e.g. called „workcloud“) with:
    EDIT: make sure there is no database called „workcloud“ in your database - or choose a different name in the following commands.
mysql -u ncadmin -p[DBPASSWORD] -e "CREATE DATABASE workcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
  1. import your MySQL-dump (issue this command from the folder where your MySQL-dump resides):
mysql -u ncadmin -p[DBPASSWORD] workcloud < nextcloud-sqlbkp_20190210.bak
  1. run calcardbackup like you did before
  2. have a look the .ics files calcardbackup created
    • if the calendars aren‘t the ones from your old installation, write again in this thread
    • if you got the calendars from your old installation you can delete the database again with:
mysql -u ncadmin -p[DBPASSWORD] -e "DROP DATABASE workcloud;"

In any case let me know how it goes :slight_smile: