Tine Admin HowTo: Import Demo Data
Version: Pino 2022.11
Import of Demo Data from a set
The following command creates the demo data defined by the file Admin.yml:
php tine20.php --method=Admin.createDemoData --username=admin --password=xyz -- demodata=set set=Admin.yml
Admin.yml
########################
# Tine 2.0
# @package Admin
# @subpackage DemoData
# @license http://www.gnu.org/licenses/agpl.html AGPL Version 3
# @author Philipp Schüle <p.schuele@metaways.de>
# @copyright Copyright (c) 2018 Metaways Infosystems GmbH (http://www.metaways.de)
#
# demodata for Admin module
# imports users, groups and roles
########################
---
name: users groups roles
files:
#$app,$model,$definition,$file
- Admin/User/admin_user_import_csv/user.csv
- Admin/Group/admin_group_import_csv/group.csv
- Admin/Role/admin_role_import_csv/role.csv
# this set could contain other sets:
# sets:
# - another_set.yml
Import Demo Date for all apps
createAllDemoData
creates demo data for all applications. It takes the same arguments as <app name>.createDemoData
and an additional argument "skipAdmin" to force no user/group/role creation
php tine20.php --method=Tinebase.createAllDemoData --username=admin --password=xyz # creates all demo data for all installed applications