1

I cannot find anything properly documented on how to move Apostrophe CMS from one Server to another Server.

Any Step by Step guides?

mad2kx
  • 31
  • 11

1 Answers1

2

There is not a specific guide for this as far as I'm aware. Assuming your new server is set up correctly, the steps would basically be:

  1. Export the MongoDB database from the old server using the mongodump CLI command, mongoexport, or some other way (e.g., a GUI)
  2. Import the database dump into the new server with the same db name (likely mongoimport)
  3. Deploy your project code to the new server
  4. rsync or otherwise transfer the media uploads in public/uploads/attachments

Then you get the new server online and you should be pretty much good to go. There will be many steps in between for process monitoring and whatnot, but those are basic steps. Move the database, deploy the project code, and transfer the media. For deployment and server config the recommended tools are stagecoach and mechanic

alexbea
  • 1,311
  • 14
  • 25
  • `mongodump` and `mongorestore` are the easiest tools for complete and accurate backup and restore of mongodb in a native format. `mongoexport` and `mongoimport` can do it, with the extended JSON format, but it is less guaranteed to be an exact match for what you had before. – Tom Boutell Jul 10 '20 at 12:27
  • Working scripts for syncing sites to and from a server are in `scripts/sync-up` and `scripts/sync-down` in the apostrophe-boilerplate project, which you can find in the apostrophecms github. – Tom Boutell Jul 10 '20 at 12:28
  • 1
    As of mongodb 4.4, best way to move the database seems to be using `mongodump`/`mongorestore` with the `--archive` option. – Pipetus Sep 27 '20 at 20:36