Nextcloud Deck delivers: file attachments, checkboxes and export

@woosting regarding the guide, have a look at Using the OCC Command in Nextcloud admin docs.
Following that guide, on my Ubuntu install I’ve run the following to get a list of commands:

> sudo -u www-data php /var/www/nextcloud/occ list
<snip>
 deck
  deck:export                         Export a JSON dump of user data
<snip>

I can then show the help page for that command to get more information:

> sudo -u www-data php /var/www/nextcloud/occ help deck:export
Usage:
  deck:export <user-id>

Arguments:
  user-id               User ID of the user

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --no-warnings     Skip global warnings, show command output only
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Export a JSON dump of user data

You can redirect the JSON output of the command using the standard shell operators like ‘|’ and ‘>’.
So if I wanted to export data for user “fabio” to a JSON file in my OS, in my environment I would run:
sudo -u www-data php /var/www/nextcloud/occ deck:export fabio > /path/i/want/fabio.deck.json

What to do with the JSON after that would be up to you. I don’t currently see a way to import it, but I’m sure that’s high priority for next release. The GitHub issue for import/export looks to still be open.
Updated in 2024: Unfortunately, the import feature still isn’t there. Folks have put together a few unofficial attempts. They’re missing some of the integration features, but you may find something like this script useful in a pinch.

5 Likes