Restoring Data from Database Backup

Yes, there is. You can use the script calcardbackup to create *.ics and *.vcf files from the calendar and contacts data in the database. Then you can import those backed up files to a new Nextcloud instance or import them to a client and let them sync the data to a new Nextcloud instance. Though calcardbackup is written for bash, it should also work with openBSDs ksh (from what I read). Otherwise you need to install bash which is also available for openBSD.
IMPORTANT: until release of version 0.8.0 you need to use the testing branch from calcardbackup (version 0.7.2-25 (22.10.2018) or higher)!

  1. create a dummy Nextcloud directory structure for Nextclouds config.php:
    mkdir -p /usr/local/bin/nextcloud-dummy/config
  2. create a file called config.php in that folder and add the dbtype:
    echo "'dbtype' => 'sqlite3'," > /usr/local/bin/nextcloud-dummy/config/config.php
  3. restore the SQLite3 database from your backup in the dummy Nextcloud directory created in step 1:
    sqlite3 "/usr/local/bin/nextcloud-dummy/owncloud.db" < "/path/to/nextcloud-sqlite3.bak"
  4. clone calcardbackup:
    git clone https://github.com/BernieO/calcardbackup
  5. enter the repository directory:
    cd calcardbackup
  6. switch to testing branch (this is only necessary until version 0.8.0 is released):
    git checkout testing
  7. run calcardbackup and give as first argument the path to the dummy Nextcloud directory created in step 1:
    ./calcardbackup /usr/local/bin/nextcloud-dummy
1 Like