apostrophe-page-migrator
This module will allow for documents to be exported from existing Apostrope projects and imported into projects on other environments. For example, this can be used when moving data from a development environment into a production environment.
Last updated 3 years ago by boutell .
MIT · Original npm · Tarball · package.json
$ cnpm install apostrophe-page-migrator 
SYNC missed versions from official npm registry.

What does it do?

This module lets you export a page and all of the docs it joins with, via its own schema or via widgets, as a zipfile. That zipfile can then be imported into another Apostrophe site, usually one which began life as a copy of the same mongodb database.

Before you try this module

Check out apostrophe-workflow which is the most natural solution if your goal is to maintain internationalized, localized or draft and live versions of the same site.

"So when would I use this module?"

This module is useful in cases where the content of two sites is intentionally diverging but some content is still maintained in common. Otherwise, use apostrophe-workflow.

How do I enable it?

npm install --save apostrophe-page-migrator
// in app.js
modules: {
  'apostrophe-page-migrator': {}
}

How do I use it?

To export a page, go to that page, click "Page Menu," click "Page Settings" and then click the "Export" button. A zipfile will download to your computer.

To import a page, log in and click the "Import" button on the admin bar, then click the browse button to select and upload the zipfile.

Resolving conflicts

When importing a zipfile to a site that already contains one or more of the docs in the zipfile, the most recently edited version wins. If nothing appears to change this is usually the issue.

Permissions

Currently only an admin may import a zipfile. Anyone who can access page settings can export a zipfile.

Limitations

Unless the page being exported is the home page or a direct child of it, the parent page must exist in both sites, with the same _id. Otherwise the importer has no certain way of understanding where the page should be added/updated on the new site.

Similarly, if you think of the page as "the same" on two sites but they do not have the same _id, you will wind up with a duplicate after the import.

The related documents that are necessary, via joins in the schema of the page or its widgets, to render the page are the related documents that will be exported and imported with it. If joins were carried through without such a limitation the zipfile would typically be the entire site.

Current Tags

  • 2.0.4                                ...           latest (3 years ago)

5 Versions

  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 4
Dependencies (6)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |