wegmeister / backup
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:neos-package
Requires
- neos/flow: ^8.3
README
Neos CMS package that provides import & export functionality for content.
Installation
Go to your site package and add this package to your composer dependencies:
cd DistributionPackages/Vendor.Site
composer require wegmeister/backup --no-update
Then go back to your project root and run the actual update:
composer update
Commands
Export parts of the content tree
To export parts of the content tree, run the following command:
./flow content:export siteNodeName sourceNodeIdentifier filename
where
siteNodeName
is the name of the site node you want to export from,sourceNodeIdentifier
is the node identifier of the node you want to use as starting point; this node and all its descendants will be exported,filename
is the name of the path and (xml) file to which the content will be exported (fe../Backup/export.xml
). Next to the file, a folderResources
with all the exported resources will be created. The folder will be created in the same directory as the file.
Further options:
--tidy
: will create a tidy XML file (no line breaks, no indentation)--nodeTypeFilter=FILTER
: will only export nodes matching the filter (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text").--workspace=WORKSPACE_NAME
: can be used to export another workspace. If not set, thelive
workspace will be exported.
Import parts of the content tree
To import previously exported data, run the following command:
./flow content:import siteNodeName filename
where
siteNodeName
is the name of the site node you want to import to,filename
is the name of the path and (xml) file containing the previously exported data (fe../Backup/export.xml
).
Special thanks
Special thanks to Sebastian Helzle, who shared this code via Slack. Maybe some more commands will follow if needed (some of which are already mentioned in Flowpack.ContentTransfer).