TYPO3 v15 dev-main snapshot ()
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
:navigation-title: Command line
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _command_line:
|
||||
|
||||
======================================================
|
||||
Using the Import/Export tool from the command line
|
||||
======================================================
|
||||
|
||||
The import/export tool can alternatively also be used via the command line.
|
||||
The advantage of using the CLI is that there is no PHP time limit, therefore
|
||||
larger page trees can be exported and imported.
|
||||
|
||||
The exports and imports can be fine-tuned through the complete set of options
|
||||
also available in the :ref:`import <import>` or :ref:`export module <export>`
|
||||
of the TYPO3 backend.
|
||||
|
||||
.. note::
|
||||
|
||||
If your TYPO3 installation is based on Composer, you can run the command
|
||||
with the shortcut :bash:`vendor/bin/typo3` instead of
|
||||
:bash:`typo3/sysext/core/bin/typo3`.
|
||||
|
||||
.. attention::
|
||||
|
||||
Exporting and importing content may expose sensitive data or bypass
|
||||
permission boundaries. Review the :ref:`security considerations regarding
|
||||
exports <security>` before using this functionality.
|
||||
|
||||
.. _command_line-export:
|
||||
|
||||
Exporting content from the command line
|
||||
=======================================
|
||||
|
||||
Export the entire TYPO3 page tree (or selected parts of it) to a data file of
|
||||
format XML or T3D:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Composer mode
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
vendor/bin/typo3 impexp:export [options] [--] [<filename>]
|
||||
|
||||
.. tab:: Classic mode
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
typo3/sysext/core/bin/typo3 impexp:export [options] [--] [<filename>]
|
||||
|
||||
With these options available:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Arguments:
|
||||
filename The filename to export to (without file extension)
|
||||
|
||||
Options:
|
||||
--type[=TYPE] The file type (xml, t3d, t3d_compressed). [default: "xml"]
|
||||
--pid[=PID] The root page of the exported page tree. [default: -1]
|
||||
--levels[=LEVELS] The depth of the exported page tree.
|
||||
"-2": "Records on this page", "0": "This page",
|
||||
"1": "1 level down", .. "999": "Infinite levels". [default: 0]
|
||||
--table[=TABLE] Include all records of this table.
|
||||
Examples: "_ALL", "tt_content", "sys_file_reference", etc.
|
||||
(multiple values allowed)
|
||||
--record[=RECORD] Include this specific record. Pattern is "{table}:{record}".
|
||||
Examples: "tt_content:12", etc. (multiple values allowed)
|
||||
--list[=LIST] Include records of this table and page. Pattern is "{table}:{pid}".
|
||||
Examples: "be_users:0", etc. (multiple values allowed)
|
||||
--include-related[=INCLUDE-RELATED] Include record relations to this table, including the related record.
|
||||
Examples: "_ALL", "sys_category", etc. (multiple values allowed)
|
||||
--include-static[=INCLUDE-STATIC] Include record relations to this table, excluding the related record.
|
||||
Examples: "_ALL", "be_users", etc. (multiple values allowed)
|
||||
--exclude[=EXCLUDE] Exclude this specific record. Pattern is "{table}:{record}".
|
||||
Examples: "fe_users:3", etc. (multiple values allowed)
|
||||
--exclude-disabled-records Exclude records considered disabled by their TCA configuration,
|
||||
e.g. "disabled", "starttime", or "endtime" fields.
|
||||
--exclude-html-css Exclude referenced HTML and CSS files.
|
||||
--title[=TITLE] The meta title of the export.
|
||||
--description[=DESCRIPTION] The meta description of the export.
|
||||
--notes[=NOTES] The meta notes of the export.
|
||||
--dependency[=DEPENDENCY] Declare required TYPO3 extensions for the export.
|
||||
Examples: "news", "powermail", etc. (multiple values allowed)
|
||||
--save-files-outside-export-file Save files in a separate folder named "{filename}.files"
|
||||
instead of embedding them in the export file.
|
||||
|
||||
.. _command_line-import:
|
||||
|
||||
Importing content from the command line
|
||||
=======================================
|
||||
|
||||
Import an export dump file in XML or T3D format into a TYPO3 instance:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Composer mode
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
vendor/bin/typo3 impexp:import [options] [--] <file> [<pid>]
|
||||
|
||||
.. tab:: Classic mode
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
typo3/sysext/core/bin/typo3 impexp:import [options] [--] <file> [<pid>]
|
||||
|
||||
With these options available:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Arguments:
|
||||
file The file path to import from (.t3d or .xml).
|
||||
pid The page to import to. [default: 0]
|
||||
|
||||
Options:
|
||||
--update-records Update existing records with the same UID instead of inserting new ones.
|
||||
--ignore-pid Prevent page ID correction for updated records
|
||||
(requires --update-records).
|
||||
--force-uid Force UIDs from the file.
|
||||
--import-mode[=IMPORT-MODE] Set the import mode for specific records.
|
||||
Pattern: "{table}:{record}={mode}".
|
||||
Modes:
|
||||
- For new records: "force_uid", "exclude"
|
||||
- For existing records: "as_new", "ignore_pid",
|
||||
"respect_pid", "exclude"
|
||||
Examples: "pages:987=force_uid", "tt_content:1=as_new",
|
||||
etc. (multiple values allowed)
|
||||
--enable-log Log all database actions.
|
||||
@@ -0,0 +1,128 @@
|
||||
:navigation-title: Export
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _export:
|
||||
|
||||
==========================================
|
||||
Exporting content from TYPO3 to XML or T3D
|
||||
==========================================
|
||||
|
||||
The export functionality is only available for admin users and backend
|
||||
users for which the Page TSconfig option
|
||||
:ref:`options.impexp.enableExportForNonAdminUser
|
||||
<t3tsref:useroptions-impexp-enableExportForNonAdminUser>` has been enabled.
|
||||
|
||||
.. attention::
|
||||
|
||||
Exporting content may expose sensitive data or allow unwanted file access.
|
||||
Review the :ref:`security considerations regarding exports <security>`
|
||||
before using this functionality.
|
||||
|
||||
.. _export-open-module:
|
||||
|
||||
Open the export module
|
||||
======================
|
||||
|
||||
In the page tree, right-click the page from which you want to start the
|
||||
export (1) and select :guilabel:`More options ... > Export` (2).
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/ContextMenuExport.rst.txt
|
||||
|
||||
.. _export-configure-settings:
|
||||
|
||||
Configure the export settings
|
||||
=============================
|
||||
|
||||
On the first tab of the export module you can fine-tune the export (1).
|
||||
|
||||
- If you want to export all data of the selected page including its
|
||||
subpages, select the "Infinite" option in the :guilabel:`Levels`
|
||||
selection box.
|
||||
|
||||
- Under :guilabel:`Include tables` you can limit the types of records to
|
||||
be exported.
|
||||
|
||||
- Under :guilabel:`Include relations to tables` you specify which
|
||||
relations of the records should be included in the export file. The
|
||||
related records will be included even if they are outside the pages
|
||||
selected for export.
|
||||
|
||||
- Under :guilabel:`Use static relations for tables` you select which
|
||||
relations should be included without including the related record. This
|
||||
is useful if the related record already exists in the target TYPO3
|
||||
instance.
|
||||
|
||||
- If the same table is selected in both :guilabel:`Include relations to
|
||||
tables` and :guilabel:`Use static relations for tables`, the relation
|
||||
is treated as static.
|
||||
|
||||
- The :guilabel:`Exclude disabled elements` checkbox excludes records
|
||||
that are disabled according to their TCA configuration. This is checked
|
||||
by default.
|
||||
|
||||
Apply your changes via the :guilabel:`Update` button and repeat this step
|
||||
until the preview meets your expectations.
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/ConfigureExport.rst.txt
|
||||
|
||||
.. _export-review-records:
|
||||
|
||||
Review the records to be exported
|
||||
=================================
|
||||
|
||||
All pages selected for export are listed in the upper part of the dialog
|
||||
(1).
|
||||
|
||||
Below this is a detailed list of all data to be exported (2). Here you
|
||||
can exclude individual records or manually make them editable, if
|
||||
supported.
|
||||
|
||||
If the relation to records is lost, an orange exclamation mark will be
|
||||
shown. This happens if records are stored outside the export page tree
|
||||
or if excluded tables break relations.
|
||||
|
||||
Apply your changes by pressing the :guilabel:`Update` button and repeat
|
||||
this step as needed until the preview matches your expectations (3).
|
||||
|
||||
Then switch to the :guilabel:`Advanced Options` tab (4).
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/CheckExport.rst.txt
|
||||
|
||||
.. _export-advanced-options:
|
||||
|
||||
Optionally select advanced export options
|
||||
=========================================
|
||||
|
||||
In the third tab of the export module you can specify further export
|
||||
options (1).
|
||||
|
||||
Checking :guilabel:`Save files in extra folder ..` saves linked files
|
||||
in a separate folder instead of embedding them in the export file. This
|
||||
is mandatory for :ref:`distributions <t3coreapi:distribution>` or
|
||||
useful when handling large file sets that would otherwise bloat the
|
||||
export file and potentially exhaust memory. The folder is named
|
||||
"{filename}.files".
|
||||
|
||||
Apply your changes via the :guilabel:`Update` button (2) and then switch
|
||||
to the :guilabel:`File & Preset` tab (3) to proceed.
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/SelectAdvancedExportOptions.rst.txt
|
||||
|
||||
.. _export-perform:
|
||||
|
||||
Perform the export
|
||||
==================
|
||||
|
||||
In the second tab of the export module you can specify the metadata for
|
||||
the export (1) before starting the export process.
|
||||
|
||||
You can then either:
|
||||
|
||||
- Download the export file (2.a), or
|
||||
- Save it on the server (2.b).
|
||||
|
||||
Saving on the server is currently required if you have enabled saving
|
||||
related files in a separate folder (see
|
||||
:ref:`export-advanced-options`).
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/DownloadExport.rst.txt
|
||||
@@ -0,0 +1,84 @@
|
||||
:navigaton-title: Import
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _import:
|
||||
|
||||
===========================================
|
||||
Importing `.t3d` files in the TYPO3 backend
|
||||
===========================================
|
||||
|
||||
The import functionality is only available for admin users and Backend
|
||||
users for which the Page TSconfig option
|
||||
:ref:`options.impexp.enableImportForNonAdminUser
|
||||
<t3tsref:useroptions-impexp-enableImportForNonAdminUser>` has been enabled.
|
||||
|
||||
.. contents:: Table of contents
|
||||
|
||||
.. note::
|
||||
|
||||
Make sure that any required extensions are installed and the database
|
||||
schema is up-to-date before starting the import. Otherwise, the data
|
||||
related to non-existing tables will not be imported.
|
||||
|
||||
.. _import-open-module:
|
||||
|
||||
Open the import module
|
||||
======================
|
||||
|
||||
In the page tree, right-click the page you want to import to (1) and
|
||||
select :guilabel:`More options ... > Import` (2).
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/ContextMenuImport.rst.txt
|
||||
|
||||
.. _import-upload-file:
|
||||
|
||||
Upload the export file
|
||||
======================
|
||||
|
||||
On the second tab of the import module you can upload the export file
|
||||
to your target TYPO3 instance.
|
||||
|
||||
Select the file to upload (1) and click the :guilabel:`Upload files`
|
||||
button (2).
|
||||
|
||||
Then switch to the :guilabel:`Import` tab (3).
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/UploadImport.rst.txt
|
||||
|
||||
.. _import-configure-settings:
|
||||
|
||||
Configure the import settings
|
||||
=============================
|
||||
|
||||
On the first tab of the import module you can configure the import.
|
||||
|
||||
First select the uploaded export file (1). Then adjust the general
|
||||
settings (2). Finally, press the :guilabel:`Preview` button (3).
|
||||
|
||||
- Checking :guilabel:`Update records` means that existing records with
|
||||
the same UID will be updated instead of newly inserted.
|
||||
|
||||
- Checking :guilabel:`Do not show differences in records` prevents
|
||||
calculation of differences between existing and imported records.
|
||||
Note: The compare function is currently broken and therefore disabled
|
||||
in the screenshot.
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/ConfigureImport.rst.txt
|
||||
|
||||
.. _import-review-data:
|
||||
|
||||
Review the data to be imported
|
||||
==============================
|
||||
|
||||
A tree with the records to be imported is displayed below the
|
||||
configuration form (1). If you change any of the options (2), you can
|
||||
reload this preview with the :guilabel:`Preview` button (3).
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/CheckAndPerformImport.rst.txt
|
||||
|
||||
.. _import-execute:
|
||||
|
||||
Execute the import
|
||||
==================
|
||||
|
||||
Click the :guilabel:`Import` button to execute the import process.
|
||||
@@ -0,0 +1,33 @@
|
||||
:navigation-title: Usage
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _usage:
|
||||
|
||||
======================================
|
||||
How to use the Import/Export extension
|
||||
======================================
|
||||
|
||||
The import/export tool can be accessed via the :ref:`TYPO3 backend<export>` or
|
||||
the :ref:`command line<command_line>`.
|
||||
|
||||
Users with admin rights can use both the import and the export functionality.
|
||||
Editors with no admin rights can only use the export functionality (unless
|
||||
it is disabled). Editors can only export content they have access to.
|
||||
|
||||
The import functionality can be used for :ref:`content updates<content-update>`
|
||||
instead of importing the entire page tree and its content.
|
||||
|
||||
The export functionality can be used to export initial content for use in
|
||||
:ref:`distributions<t3coreapi:distribution>`.
|
||||
|
||||
It is also possible to save and load export data :ref:`presets<presets>` for
|
||||
recurring export jobs.
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
Export
|
||||
Import
|
||||
Update
|
||||
Presets
|
||||
CommandLine
|
||||
@@ -0,0 +1,69 @@
|
||||
:navigation-title: Presets
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _presets:
|
||||
|
||||
=====================================================
|
||||
Saving and reusing export configurations with presets
|
||||
=====================================================
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/Presets.rst.txt
|
||||
|
||||
Any configuration settings made in the :ref:`export module <export>` are not
|
||||
saved automatically. To reuse export configurations, you need to save them
|
||||
as presets.
|
||||
|
||||
Presets are stored internally in the :sql:`tx_impexp_presets` table and can
|
||||
be included in export files by adding this table to the export.
|
||||
|
||||
.. contents:: Table of content
|
||||
|
||||
.. warning::
|
||||
|
||||
If you have manually excluded records from export, the :sql:`uid` values of
|
||||
those exclusions are saved in the preset. This can lead to unexpected
|
||||
exclusions if you reuse the preset in another TYPO3 instance.
|
||||
|
||||
Therefore, review the excluded records in the "Configuration" tab
|
||||
thoroughly when you load a preset.
|
||||
|
||||
.. _presets-save:
|
||||
|
||||
Saving a new preset
|
||||
===================
|
||||
|
||||
To save a new preset:
|
||||
|
||||
1. Go to :guilabel:`Export > File & Preset > Presets`.
|
||||
2. Enter a :guilabel:`Title of new preset` (A.1).
|
||||
3. Click :guilabel:`Save` (A.2).
|
||||
|
||||
.. _presets-load:
|
||||
|
||||
Loading an existing preset
|
||||
==========================
|
||||
|
||||
To load a saved preset:
|
||||
|
||||
1. Select the desired preset from :guilabel:`Select Preset` (B.1).
|
||||
2. Click :guilabel:`Load` (B.2).
|
||||
|
||||
.. _presets-modify:
|
||||
|
||||
Modifying an existing preset
|
||||
============================
|
||||
|
||||
To modify an existing preset:
|
||||
|
||||
1. Load the preset as described above.
|
||||
2. Make the required changes to the export settings.
|
||||
3. Select the same preset again in :guilabel:`Select Preset` (!).
|
||||
4. Click :guilabel:`Save` to overwrite the preset.
|
||||
|
||||
.. _presets-visibility:
|
||||
|
||||
Managing preset visibility
|
||||
==========================
|
||||
|
||||
Checking :guilabel:`Public` allows any TYPO3 backend user to load this preset.
|
||||
If left unchecked, only the creator can access the preset.
|
||||
@@ -0,0 +1,25 @@
|
||||
:navigation-title: Update content
|
||||
|
||||
.. include:: /Includes.rst.txt
|
||||
.. _content-update:
|
||||
|
||||
===========================================================
|
||||
Synchronizing content and page structures across instances
|
||||
===========================================================
|
||||
|
||||
The import/export tool can be used to synchronize content and page structures
|
||||
between different TYPO3 installations, leaving the content
|
||||
outside the exported page tree unchanged.
|
||||
|
||||
.. _content-update-backend:
|
||||
|
||||
Updating content using the TYPO3 backend
|
||||
========================================
|
||||
|
||||
To update existing content without creating duplicates, check the option:
|
||||
|
||||
:guilabel:`Import > Import Options > Update records`
|
||||
|
||||
This ensures that records with matching UIDs are updated in place.
|
||||
|
||||
.. include:: /Images/AutomaticScreenshots/UpdateContent.rst.txt
|
||||
Reference in New Issue
Block a user