What's the solution to restore confluence from windows instance to linux instance
Asked by jilong sun:

Previously I have a Windows confluence instance, and I have saved its MySQL data, and the confluence application data. Now I set up a new Linux instance, when I restore the data from old confluence application data zip, the error shows up as bellow:

What can be good solution to restore the old data to new instance, both mysql data and the application data .

![restore.png](/t5/image/serverpage/image-id/13090i3B461AA23001F6CC/image-size/large?v=v2&px=999 "restore.png")


Answers:
author: Shannon S
body: Hi Jilong,

You'll need to change a few things before migrating to Linux. Have a look here:

* [Migrating Confluence Between Servers](https://confluence.atlassian.com/doc/migrating-confluence-between-servers-184150.html)

Please review that article and let me know if you have any questions!

Regards,

Shannon

comments: author: jilong sun
body: I have connected to the old mysql database, and updated the confluence.cfg.xml, but I got the error as below, and there is no corresponding log generated under log folder.

![1.png](https://community.atlassian.com/t5/image/serverpage/image-id/13284i9AC3BF78EE661384/image-size/large?v=v2&px=999 "1.png")![2.png](https://community.atlassian.com/t5/image/serverpage/image-id/13286iFA973DE0E861C6BC/image-size/large?v=v2&px=999 "2.png")


author: Shannon S
body: Jilong,

[The log files](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html) are automatically generated upon startup, and you can find those here:

\<confluence-home\>/logs/atlassian-confluence.log

As for the error, it's very common, and has a number of causes. You can review them all here:

* [Confluence does not start due to Spring Application Context has not been set](https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html)

There are about 10 solutions there so please take the time to review all of them and do let me know if you have any questions or trouble.

Regards,

Shannon


author: jilong sun
body: It seems not the problem listed in the link above. The new installation can work well, but when I switched to old home installation directory, it will lead to error. Can you help to have a look into the installation machine?

Here is the linux machine:

\[redacted\]

After the confluence is fixed, I can update the password.

confluence home directory: /data/atlassian, this is the old confluence home dir which I want to restore from.

new confluence home directory: /data/atlassian_new, this is the new installation which can work well.

confluence install directory: /opt/atlassian/confluence

this is the domain to access the confluence: <http://wiki.neutv.cn:8090>


author: Bill Bailey
body: Never post passwords.

And I would just export a full site backup from the Windows install. Then a clean install of Confluence on Linux, followed by importing the backup file.


author: Shannon S
body: Jilong Sun,

I've removed your Linux box information for your safety. Agreed with Bill, it's never a good idea to post your passwords online or provide access to your instance or server through a public forum, even if you intend to change the password later.

If you want someone to have a look at your server itself, you can hire an [Atlassian Partner](https://www.atlassian.com/partners/search) to do so and provide them the login details once you do.

If for whatever reason, the [Migrating between Servers](https://confluence.atlassian.com/doc/migrating-confluence-between-servers-184150.html) article isn't working properly for your system, you can do as Bill suggested and simply just restore your full site backup onto a clean Confluence install on your Linux box.

Let us know if you have any trouble with that.

Regards,

Shannon


author: jilong sun
body: Thanks. Now I will try to firstly restore to a windows instance, and then do a backup to restore in Linux.

But when I try to restore to a windows instance, such error happens:

```
Confluence will not start up because the build number in the home directory [7401] doesn't match the build number in the database [7502].
```

I can't update the build number in home directory to 7502, since the installation's build number is 7401, which can't be 7502 which is higher than 7401. How can I fix this? fix some data field in the database?


author: AnnWorley
body: It sounds like the database was upgraded but the Confluence [Home Directory](https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html) is older or was not upgraded. Please see: [Confluence will not start up because the build number in the Home Directory doesn't match the build number in the Database, after upgrade](https://confluence.atlassian.com/confkb/confluence-will-not-start-up-because-the-build-number-in-the-home-directory-doesn-t-match-the-build-number-in-the-database-after-upgrade-376834096.html) for instructions to diagnose and fix the issue.