What is the best method for transferring a local Neos project to an online server?


(Jean Claude Cosse) #1

Please … can you advise me on the best method ?
Of course, I tried a personal method …
Since January, I learn Neos and I did not think it would be complex to me as a French who does not understand all the technical language of Neos …
I did not understand everything ! …
Currently I am doing a new Neos installation on the linux server … then I upload by FTP … settings, yaml, ts2 files, “Data / Persistent” and database …

In advance, thank you for your advice.


Flow site:import leads to an error
(Karsten Dambekalns) #2

You can use site:export to have the content exported to your site package, and then import that again on the live server. When using this method, you’ll loose some data, though: unused assets and tags on assets won’t be part of the exported site.

Of course you can copy Data/Persistent and the database directly, after a cache:flush all should be in order again.


(Dominique Feyer) #3

We need to provide a command like flow backup:dump & flow backup:restore to automate this process as much as possible.

Can also be useful on production server to trigger a backup with DB + ressource in sync.


(Jean Claude Cosse) #4

thank’s Dominique … on my localhost (windows-wamp) I do “flow.bat flow backup:dump” ok and then what happens ?.. I tried and I have a problem with symlinks on windows ( Neos 2 beta3)

Uncaught exception #1355480641 in line 480 of C:\wamp\www\artetsol200\Packages\Framework\TYPO3.Flow\Classes\TYPO3\Flow\Core\Booting\Scripts.php: Could not publish
"C:/wamp/www/artetsol200/Packages/Framework/TYPO3.Fluid/Resources/Public"
into resource publishing target "localWebDirectoryStaticResourcesTarget"
because the source directory could not be symlinked at target location.

I will try on the linux server, but after the “backup:dump” please, where is stored the backup for I restore it ?
is my english good enought ?


(Jean Claude Cosse) #5

thank you Karsten
if I understand, with your site: export, I export an xml file ? true ?.. sorry, but I have not understood how works Neos and the data base … when I create a Page … the content is in the xml file ?..
I have not known where to find an explanation of this relationship with the database and that’s why I’m afraid and I spend a lot of time trying to understand, but it’s also because I do not understand everything in English ! :smile:


(Dominique Feyer) #6

Sorry @jean_claude this backup command does not exist currently, but should be really useful :wink:


(Karsten Dambekalns) #7

Yes, the export writes the site content into Sites.xml in your site package, and import imports that file again. See also the help:

$ flow help site:export

Export sites content

COMMAND:
  typo3.neos:site:export

USAGE:
  ./flow site:export [<options>]

OPTIONS:
  --site-node          the node name of the site to be exported; if none given
                       will export all sites
  --tidy               Whether to export formatted XML
  --filename           relative path and filename to the XML file to create.
                       Any resource will be stored in a sub folder "Resources".
  --package-key        Package to store the XML file in. Any resource will be
                       stored in a sub folder "Resources".
  --node-type-filter   Filter the node type of the nodes, allows complex
                       expressions (e.g. "TYPO3.Neos:Page",
                       "!TYPO3.Neos:Page,TYPO3.Neos:Text")

DESCRIPTION:
  This command exports all or one specific site with all its content into an XML format.

  If the package key option is given, the site(s) will be exported to the given package in the default
  location Resources/Private/Content/Sites.xml.

  If the filename option is given, any resources will be exported to files in a folder named "Resources"
  alongside the XML file.

  If neither the filename nor the package key option are given, the XML will be printed to standard output and
  assets will be embedded into the XML in base64 encoded form.

And this is the import:

$ flow help site:import

Import sites content

COMMAND:
  typo3.neos:site:import

USAGE:
  ./flow site:import [<options>]

OPTIONS:
  --package-key        Package key specifying the package containing the sites
                       content
  --filename           relative path and filename to the XML file containing
                       the sites content

DESCRIPTION:
  This command allows for importing one or more sites or partial content from an XML source. The format must
  be identical to that produced by the export command.

  If a filename is specified, this command expects the corresponding file to contain the XML structure. The
  filename php://stdin can be used to read from standard input.

  If a package key is specified, this command expects a Sites.xml file to be located in the private resources
  directory of the given package (Resources/Private/Content/Sites.xml).

(Jean Claude Cosse) #8

Ok Karsten … thank you for your explanation about xml file … but where can I find an explanation of this relationship with the database … In conclusion, if I export site and save data base more persistent and then I import, is it enough ?.. of course I will repair and refresh


(Dmitri Pisarev) #9

This package works nice for database import/export: https://github.com/million12/M12.DbExport

But Jean, if you plan serious development of this website further on, think about using tool like Surf for setting up continuous integration process for your website.
Here’s my experience with it: http://dimaip.github.io/2014/12/20/three-steps-to-deploy/


(Jean Claude Cosse) #10

Hello Dmitri !
thank you again …
you have already told me about Surf … I tried to understand, but I have given priority to the learning of Neos …
but now I’m seriously trying to understand “Surf” to be in the style of “SVN” ?
thanks for all your advice and those of Neos team,
Now I have to lurn “Surf” and your “News” to understand ‘plugins’ php etc …
what is the best ? Cheers or Best regards ?
jean-claude