My solution for moving everything, Neos or Flow on a server linux or a new one


(Jean Claude Cosse) #1

For those like me are worried about the safeguard of a site ( Neos ), I explain how to do and hope that these few explanations help …
If you want to move your domain to another server or to move it on your localhost (linux) or move your domain from your localhost (linux) to your server etc…

I use “zip” to compress files, folders, full domain etc …

If you want to zip your full domain …
First backup your database with phpMyAdmin or other backup system …

remove your folder /var/www/vhosts/your-domain.com/httpdocs/Neos/Data/Temporary/Development
remove your folder /var/www/vhosts/your-domain.com/httpdocs/Neos/Data/Temporary/Production
If I delete these files, it is because it is not useful to keep them in the safeguard…

You must install “zip” if it not already installed …

To Zip your “Neos” domain or “Flow” which is for example in :
/var/www/vhosts/your-domain.com/httpdocs/Neos

cd /var/www/vhosts/your-domain.com/httpdocs/

Then write …

zip -y -r safeguard-Neos.zip Neos
  • -y store symbolic links as the link instead of the referenced file
  • -r recurse into directories
  • safeguard-Neos.zip = the name of your safeguard file
  • Neos = folder of your Neos if his name is Neos of course

After you press “enter” … zip works …
when it finished, you will find your file safeguard-Neos.zip in /var/www/vhosts/your-domain.com/httpdocs/

You can then download it to your computer or wherever you want.
You can be sure that your “Neos” has completely been saved by keeping the famous “symlinks” which are impossible to download.


To restore your “Neos” on another server, the easiest way is to upload your safeguard-Neos.zip in the folder where you want to restore it …
for example: /var/www/vhosts/your-domain.com/httpdocs/

Then, it is best to restore the database before to decompress your safeguard-Neos.zip

Then, you simply write :

unzip safeguard-Neos.zip

and press enter …

After a while, you have your “Neos” folder that is installed as it was when you saved it.
Then you do what you want ! …

In my case, I made several times this method on a ubuntu linux plesk server and each time everything went perfectly well.

Of course, it is best not to change anything in the zipped file safeguard !..

Personally, I downloaded the safeguard.zip file on my computer (windows7) and then uploaded it on another linux server.
If you have linux on your computer, or if you have a Macintosh, I think it is possible to install the safeguard on your localhost.
Neos in principle should work because the symlinks will be properly installed …
I have not tried because I do not have linux on my computer :slight_smile:


How to clone a site package?(Solved)
Is it possible to migrate from Neos 2.0.0-beta5 to Neos 2.0 released?
(Johannes Steu) #2

Did you try to export your Site before?
Couldn’t you just safe your composer.json and your site export?


(Jean Claude Cosse) #3

To do backup, this is not necessary to export the site …
sorry, but I do not understand the meaning of your sentence :
“Couldn’t you just safe your composer.json and your site export ?”


(Johannes Steu) #4

Well if you want to backup your stuff you could safe your composer.json and/or composer.lock and your site export. If you want to restore your site you can run composer install and import your site.
This is of course not a backup like you do normally if you go for incremental backups. But this could be another, maybe easier (?!) solution?
Of course you wouldn’t have a backup where you can restore single files but composer would install all packages.


(Jean Claude Cosse) #5

Hello
I think there is confusion … I do not always look for the easiest solution, but especially one that is the most effective … what I propose is a solution to make a “full backup” to change server or simply install it again if the site stops working after code changes … I do not know your level, but for me, I’m starting with Neos and curious to learn and find out how it works … :smile: do you know a solution to download folders with “symlinks” ?.. the easiest solution is to “zip” the folder ! as explained in my solution to backup … You can “zip” what you want …


(Johannes Steu) #6

Hmm, actually i would say that this would be the most effective way. If you install your composer all symlinks and stuff will be generated. I personally wouldn’t backup all the stuff that still exists on githubs server or in my own repositories. If i deploy a site i also don’t really need more than composer.json and my site export.
So you might wanna check this option at least. It might be easier to you as well :smile:

But i don’t know how to backup/download your symlinks. Sry


(Dominique Feyer) #7

Remember me, that we need a flow cli command to handle backup correctly:

./flow backup:save --path /tmp/backup.tar.gz
./flow backup:restore --path /tmp/backup.tar.gz

Now the challenge is to do that in a solid way to support different environnement (mysql, pgsql, windows, osx, linux, …)


(Karsten Dambekalns) #8

I’d say: don’t. We can add something like this for moving everything to a new server (including domain model not in Neos, tags on Media, etc.) but not for real backup as in online DB dump etc. That is non-trivial at best and should be left to dedicated backup solutions built for the heavy lifting involved. YMMV.


(Jean Claude Cosse) #9

Hello Karsten … is it Ok now ?