I want to backup my confluence data in NAS.
Asked by ???:

hello, I had used confluence server under synology docker environments.

but after I moved into another place, I couldn't access my confluence server.

and I checked my confluence account was expired.

so I want to backup my contents in confluence and delete it.

how can I do that? please help me.


Answers:
author: Piotr Zadro?ny _Eyzee_
body: Hi [@???](/t5/user/viewprofilepage/user-id/4506240) Welcome to Atlassian Community!

#### XML METHOD {#toc-hId--537123655}

You can create ad hoc backup of your confluence in xml format and copy it outside your container. To do so, just log into Confluence, go to administration -\> Backup \& Restore section -\> make sure that Include attachments is selected and click Export

![asas.png](https://community.atlassian.com/t5/image/serverpage/image-id/155108i2522CE4103BE7B39/image-size/large?v=v2&px=999 "asas.png")

Then just copy generated xml file outside of your container by backuping attached volume (if you have home directory mounted on external volume) or using command to copy files between container and host (something like: docker cp \<container-id\>:/var/atlassian/application-data/confluence /host/path/target )

#### GENERIC METHOD {#toc-hId-1950389178}

You can also backup using native db methods like pg_dump and file copy. To backup confluence this method (prefered in production environment) you need to backup database and home directory. So we need to know how have you configured this directory and db connection.

**Home Directory:**   
First check, on your Synology docker app, details of your confluence container configuration. In Overview tab you should see where is your install and home directory. There is also information if you have configured volumes for those paths (recommended). Check the screenshot below.

![RjLest1rXZ.png](https://community.atlassian.com/t5/image/serverpage/image-id/155106iFF102C3203DCE846/image-size/large?v=v2&px=999 "RjLest1rXZ.png")

If you have configured volumes when you create this container (like home directory on my example screenshot), just backup this volume on your Synology (docker/confluence in my example).  
If you haven't configured it, you can copy files from container to host using this command:  
docker cp atlassian-confluence-server1:/var/atlassian/application-data/confluence /host/path/target  
or by stoping container and attach new volume mount to it.

**Database:**

Backup of your db depends on database you have choosen during Confluence installation. First check what db are you using. You can check it in confluence administration page in System information section:

![db.png](https://community.atlassian.com/t5/image/serverpage/image-id/155107i5057EA7D3370F2D7/image-size/large?v=v2&px=999 "db.png")

Depending on what you find there you can take different actions to backup database like native db backup utilities pg_dump (probably your db server is also working on docker container and you can just backup volume attached to its data directory to make a full copy of databases).

I hope this instructions will help you - unfortunatelly without more knowledge of configuration of your environment I cannot provide you more detailed instructions on how to make a copy/backup.

Best regards,

Piotr

comments: author: ???
body: thank you, i followed your home directory instruction, i think i got the confluence files.

but could you help me to find image files i uploaded in contents?


author: Piotr Zadro?ny _Eyzee_
body: Do you mean attachments to confluence pages?

If so, by default, the folder with attachments is in the Home Directory in the "attachments" subfolder - so by default it's

```
/var/atlassian/application-data/confluence/attachments
```

This path may have been changed - the actual one is configured in ***confluence.cfg.xml*** file in the Home Directory. You will find the line there:

![mRemoteNG_7Zeqjyzf0w.png](https://community.atlassian.com/t5/image/serverpage/image-id/155129i76B8140C965595CF/image-size/large?v=v2&px=999 "mRemoteNG_7Zeqjyzf0w.png")

Best,

Piotr


author: ???
body: as following your instructions, i searched the "attachments" file in docker. but i couldn't find the folder in the directory even root;;;;

i installed confluence image in 2019 and have used it until march 2021, there was no broken image in documents. if the directory doesn't exist.. how can? ;;; omg

i think my last hope is making port accessible again, i think its not that easy also

by the way thank you so much ??


Tags: atl-bobross

confluence-server

server