[Solved] How to transfer content?

I’ve got a multi staging environment for several NEOS Installations. Now I’m trying to transfer content from LIVE environment to TEST or DEV environments.

Using ./flow site:export --package-key Vendor.SitePackage --filename transfer

Will export all content of the site into /DistributionPackages/Vendor.SitePackage/Resources/Private/Content/*

When I transfer this to next enviroment (DEV//DistributionPackages/Vendor.SitePackage/Resources/Private/Content/*) and start a:
./flow site:import

I get everything except:

  • User Settings
  • Unused Images
  • Used PDF documents that are linked with default textlinks
  • Images that are referenced by tags in extensions like dl/gallery

So may be ok in different situations. But i need the whole content transfered.

So my current solution looks like this:

  • mysqldump the database
  • transfer Web/_Resources
  • transfer Data/Persistent/Resources
  • rm Data/Temporary/*
  • ./flow flow:cache:flush --force
  • ./flow media:clearthumbnails
  • … and repeat all steps untill I can load the website in the new environment without errors.

I understand why the first version doesn’t do what I would expect. But I don’t know why the second version produces so many errors untill it’s done.

What is wrong? Am I missing something? Or is there a description somewhere that I could use?

Yes the site export will not include everything stored in the database.
I would have expected linked resources to be included.

I personally use the sql dump + rsync for the files because there is
nothing faster and it works without issues.

You should only need these steps:

  • dump db
  • rsync Data/Persistent/Resources
  • import db
  • ./flow flow:cache:flush
  • ./flow resource:publish

If you do that you shouldn‘t get any errors.

Hi Erich

We use https://packagist.org/packages/sitegeist/magicwand which does (under the hood) exactly what Sebastian said.
Works really well in our multi-instance setups. You need to have ssh access via ssh-key authentication, username/password is not supported (for good reasons).

Tried your version Sebastian. This works perfect. Seems like resource:publish was the missing peace.