Confluence deployment with server license with EFS as shared file system on AWS
Asked by Brute Force:

I am trying to deploy confluence with a server license. I have created an autoscaling group so that if the ec2 instance is down due to some reason, a new instance will be automatically spawned in one of the two availability zones. I know I cannot have more than one instance running as I have a server license. Now given some context, my question is how can I use efs so that if the ec2 instance is down I will not lose data and the new instance can pick off from where the old one left off. By comparing Atlassian's standard data center hosting, I can see they are only storing `shared-home` and `attachments` in efs. Can I do the same with a server license? Or is there any other approach? Thanks in advance


Answers:
author: Nic Brough -Adaptavist-
body: Apologies for the delay, but yes, you can do this, in later versions.

Server now has the same directory structure as DC and the directories for shared-home and attachments contain stuff that is fine to keep on shared storage (attachments have always been suitable for sharing). Do not put the other directories on shared storage though, it will cause you problems.

Given the shared storage and a cold or warm (Warm meaning the server is up and Confluence installed and configured, but not running), then the shared storage gives you a fast reponse to a failure - all you need to do is ensure the main service really is dead, then change the network such that people will be pointed to the standby, start the standby and trigger a full re-index.

Note that I'm assuming the primary database is either still running ok, or is under full replication to a secondary copy that the stanby Confluence is looking at (you'll need to stop replication and make the replica read/write)

comments: author: Brute Force
body: Hi [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454)   
After going through the directory structure of the confluence in server mode and data center mode, I found out that they are not exactly same. In data center mode, directories such as \`analytics-logs\`, \`backups\`, \`imgEffects\`, \`plugins\`, \`viewfile\` are stored in \`shared-home\`, whereas in server mode, these same directories are outside the \`shared-home\` directory. In server mode, \`shared-home\` only contains a \`config\` directory. Can you give me the list of directories that should be stored on efs so that the auto-scaling group can safely delete the EC2 instance along with local storage if the confluence container crashes? And the new instance can pick off from where the old one left by consuming data only from efs.  
Regarding my database, your assumption is correct. My primary database is intact and still running.  
Appreciate your help!


author: Nic Brough -Adaptavist-
body: I suspect you are on an older version then, from before the home directory was restructured to be the same (this is quite a recent change)


author: Brute Force
body: Hi [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454)   
I am comparing server and data center deployment of confluence version 7.9.1(which is the latest version as per my knowledge).  
Following are the screenshots.  
The first screenshot is of the data center, and the second one is of server mode.

![data-center.png](https://community.atlassian.com/t5/image/serverpage/image-id/120633i4F188D4E624B4B61/image-size/large?v=v2&px=999 "data-center.png")![server.png](https://community.atlassian.com/t5/image/serverpage/image-id/120634iC83AE7332986AA1A/image-size/large?v=v2&px=999 "server.png")

Appreciate your help!


author: Nic Brough -Adaptavist-
body: That is really strange, but thinking about it, I've only ever installed data centre by deploying server first, then converting, so maybe the installs are subtly different.

In the older versions, we had to rearrange the directories in home to move some into shared-home, in the later version, you just change the licence to DC. Maybe the licence change triggers something that re-arranges directories for us?


author: Brute Force
body: [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454)   
Now the directory structure is different. Do we know which directories should be stored in efs? Is there any standard Atlassian documentation for the same?

Thanks


Tags: aws

confluence-server

server