Data Exporter

Important Information

This app is currently in beta stage, the functionality is officially not supported.
Please file any issues here.
The app is not available on the marketplace.
To use this app, you must git clone it from the data_exporter repository and run make all in the apps root directory to install all dependencies.


A set of occ command line tools to export and import users with their shares from one ownCloud instance in to another. Please see what is exported for export details and known limitations for limitation details. Please see the Data Exporter Commands description for details using the occ commands.

To use data exporter, you must install and enable the data exporter app on both, the source and the target instance first.

Use Cases

  • Manual zero-downtime migration of users and their shares from one instance in to another.

  • Migrate from instances with different storages (POSIX to S3).

  • Service GDPR-Requests by providing all files and metadata of a user in a single package.

  • Merge users from different instances.

Usage Example

Export user1 from a source instance to a target instance while preserving all shares with users on the source instance. For this example, both instances must be able to reach each other via federation.

Test if you can create remote-shares before starting this process.

Export the User on the Source Instance

This will create a folder /tmp/export/user1 which contains all the files and metadata of the user.

sudo -u www-data php occ instance:export:user user1 /tmp/export

Copy the Export to the Target Instance

Copy the created export to the target instance, for example using scp:

scp -rp /tmp/export

Import the User on the Target Instance

This imports the user in to the target instance while converting all his outgoing-shares to federated shares pointing to the source instance:

sudo -u www-data php occ instance:import:user /tmp/export/user1

Recreate all Shares to Point to the Target Instance

user1 now lives on a target instance, therefore it is necessary to recreate all shares so that they point to the target instance. To do so run this command on the source instance:

sudo -u www-data php occ instance:export:migrate:share user1

Delete the User on the Source Instance

Finally delete user1 on the source instance:

This can not be undone!
If the user is stored in the ownCloud database, you need to manually reset his password on the target instance. See known limitations for further information.
sudo -u www-data php occ user:delete user1

What is Exported

  • Files (Local)

  • Meta-data (Username, Email, Personal Settings)

  • Shares (Local, Link-shares, Group-Shares)

  • Versions

Known Limitations

  • External storages, comments and tags are not exported

  • If a user is stored in the ownCloud database (not-LDAP etc.) the password must be manually reset by the admin as passwords can not be migrated.

  • Versions import in to S3 does not preserve the version timestamp.

  • Import alias (import using another username) currently does not work and breaks share-import.

  • Shares import requires federation to be correctly setup between both servers and share-api to be enabled.

  • A share’s state will be always "accepted" regardless of the state in the old server.

  • Remote shares from both directions need to be manually accepted.

  • Federated shares from other servers are not migrated.

  • Password protected link-shares are not imported correctly, user needs to reset the password.

  • Group shares require the group to be present on the target-system or else the share will be ignored silently.

  • If link-shares require a password on the new server but do so on the old the import process will crash.

As this is an early version some limitations might be fixed in the future while others can not be circumvented.