Projects tigase _server server-core Commits c651f605
ctrl k
  • scripts/tigase.sh
    ■ ■ ■ ■
    skipped 19 lines
    20 20  function usage()
    21 21  {
    22 22   echo "";
    23  - echo "Usage: $0 {start|stop|run|clear|clearrestart|restart|check|status|install-schema|upgrade-schema|upgrade-config} [params-file.conf] [parameters]"
     23 + echo "Usage: $0 {start|stop|run|clear|clearrestart|restart|check|status|install-schema|upgrade-schema|upgrade-config|export-data|import-data} [params-file.conf] [parameters]"
    24 24   echo "";
    25 25   echo -e "\tFor upgrade-schema task please add --help as a parameter a for list of parameters supported by this task."
    26 26   exit 1
    skipped 247 lines
  • src/main/restructured/Tigase_Administration/Database_Management/Importing_User_Data.inc
    ■ ■ ■ ■ ■ ■
    1  -Importing User Data
     1 +Importing & Exporting User Data
    2 2  --------------------------
     3 +
     4 +Importing User Data from compatible repository
     5 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    3 6  
    4 7  You can easily copy data between Tigase compatible repositories that is repositories for which there is a database connector. However, it is not that easy to import data from an external source. Therefore a simple data import functionality has been added to repository utilities package.
    5 8  
    skipped 74 lines
    80 83   LINES TERMINATED BY '\n'
    81 84   FROM test_table;
    82 85  
     86 +Importing User Data with XEP-0227: Portable Import/Export Format
     87 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     88 +
     89 +You can easily import data exported from another XMPP server (or exported for Tigase XMPP Server, see below) using XEP-0227: Portable Import/Export Format.
     90 +
     91 +To import data, you need to have Tigase XMPP Server configured but stopped and files containing exported data stored in some location (in our case in directory ``xep-0227-data`` stored inside Tigase XMPP Server installation directory) on the same server as Tigase XMPP Server.
     92 +
     93 +Now to import data to your repository you simply execute the command:
     94 +
     95 +.. code:: sh
     96 +
     97 + scripts/tigase.sh import-data --from=xep-0227-data --include-mix --include-muc --include-pubsub
     98 +
     99 +That will import all data including data from MIX, MUC, and PubSub component as well as data specified in XEP-0227.
     100 +
     101 +*Note, if your data is located at a different place you will need to adjust ``--from`` parameter value.
     102 +
     103 +To list all of the options available for importing data (ie. allowing to import data from MIX, MUC, PubSub, or excluding MAM data), you should execute following command:
     104 +
     105 +.. code:: sh
     106 +
     107 + scripts/tigase.sh import-data --help
     108 +
     109 + Usage:
     110 + $ scripts/tigase.sh [task] [params-file.conf] [options]
     111 + if the option defines default then <value> is optional
     112 +
     113 + Tasks:
     114 + export-data - Export data to XML
     115 + import-data - Import data from XML
     116 +
     117 + Options:
     118 +
     119 + --help, (optional)
     120 + Print the help
     121 +
     122 + -I, --interactive, (optional)
     123 + Enable interactive mode, which will result in prompting for missing parameters
     124 +
     125 + --config-file=value, (optional)
     126 + Path to Tigase XMPP Server config file (default: etc/config.tdsl)
     127 +
     128 + --from=value,
     129 + Path to omport data from
     130 +
     131 + --debug, (optional)
     132 + Enable verbose logging (default: false)
     133 +
     134 + --exclude-user-mam, (optional)
     135 + Exclude users MAM archives (default: false)
     136 +
     137 + --plain-credentials, (optional)
     138 + Import PLAIN credentials (default: false)
     139 +
     140 + --include-mix, (optional)
     141 + Include MIX component data (default: false)
     142 +
     143 + --include-muc, (optional)
     144 + Include MUC component data (default: false)
     145 +
     146 + --include-pubsub, (optional)
     147 + Include PubSub component data (default: false)
     148 +
     149 +
     150 +Exporting User Data to XEP-0227: Portable Import/Export Format
     151 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     152 +
     153 +You can easily export data from Tigase XMPP Server to the XML files using XEP-0227: Portable Import/Export Format.
     154 +
     155 +To export data you need to execute following command in the Tigase XMPP Server installation directory. We are assuming here that files will be exported to ``xep-0227-data`` directory in Tigase XMPP Server installation directory.
     156 +
     157 +Now to export data from your repository you simply execute the command:
     158 +
     159 +.. code:: sh
     160 +
     161 + scripts/tigase.sh export-data --to=xep-0227-data --include-mix --include-muc --include-pubsub
     162 +
     163 +That will export all data including data from MIX, MUC, and PubSub component as well as data specified in XEP-0227.
     164 +
     165 +*Note, you prefer exported data to be located in a different place you will need to adjust ``--to`` parameter value.
     166 +
     167 +To list all of the options available for exporting data (ie. allowing to import data from MIX, MUC, PubSub, or excluding MAM data), you should execute following command:
     168 +
     169 +.. code:: sh
     170 +
     171 + scripts/tigase.sh export-data --help
     172 +
     173 + Usage:
     174 + $ scripts/tigase.sh [task] [params-file.conf] [options]
     175 + if the option defines default then <value> is optional
     176 +
     177 + Tasks:
     178 + export-data - Export data to XML
     179 + import-data - Import data from XML
     180 +
     181 + Options:
     182 +
     183 + --help, (optional)
     184 + Print the help
     185 +
     186 + -I, --interactive, (optional)
     187 + Enable interactive mode, which will result in prompting for missing parameters
     188 +
     189 + --config-file=value, (optional)
     190 + Path to Tigase XMPP Server config file (default: etc/config.tdsl)
     191 +
     192 + --to=value,
     193 + Path to export data to
     194 +
     195 + --debug, (optional)
     196 + Enable verbose logging (default: false)
     197 +
     198 + --exclude-user-mam, (optional)
     199 + Exclude users MAM archives (default: false)
     200 +
     201 + --export-mam-since=value, (optional)
     202 + Export MAM archive since
     203 +
     204 + --export-mam-batch-size=value, (optional)
     205 + Export MAM archive batch size (default: 50000)
     206 +
     207 + --plain-credentials, (optional)
     208 + Export PLAIN credentials (if any exist) (default: false)
     209 +
     210 + --include-mix, (optional)
     211 + Include MIX component data (default: false)
     212 +
     213 + --include-muc, (optional)
     214 + Include MUC component data (default: false)
     215 +
     216 + --include-pubsub, (optional)
     217 + Include PubSub component data (default: false)
     218 +
     219 + --exclude-pep, (optional)
     220 + Exclude user PEP data (default: false)
  • src/main/restructured/Tigase_Administration/Database_Management/Management.rst
    ■ ■ ■ ■
    skipped 359 lines
    360 360  .. include:: Database_Preparation.inc
    361 361  .. include:: Hashed_User_Passwords_in_Database.inc
    362 362  .. include:: Multiple_Databases.inc
    363  -.. include:: Importing_User_Data.inc
     363 +.. include:: Importing_Exporting_User_Data.inc
    364 364  .. include:: Existing_Databases.inc
    365 365  .. include:: Schema_Updates.inc
Please wait...
Page is in error, reload to recover