Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

For attachments and DB back up is there any order in which the backups needs to be taken to maintain

ELIZABETH_JOHN May 26, 2020

For confluence backups, suggestion is to take confluence.cfg.xml, attachments folder and DB back up at the minimum. My understanding is that  "confluence.cfg.xml" needs to be taken just once and need not be taken daily. For attachments and DB back up is there any order in which the backups needs to be taken to maintain integrity of data. For daily backups, which one should be taken first - DB back up and attachments?

In the attachments folder the data is present in the following format and it should have some reference in DB, but "attachmentdata" table in DB is empty.

 

2632 ./ver003/237/230/4980737/202/244/17994202/17994205
2636 ./ver003/237/230/4980737/202/244/17994202
2640 ./ver003/237/230/4980737/202/244
2644 ./ver003/237/230/4980737/202
84 ./ver003/237/230/4980737/21/14/12264271/12264274
160 ./ver003/237/230/4980737/21/14/12264271/12264273
248 ./ver003/237/230/4980737/21/14/12264271
252 ./ver003/237/230/4980737/21/14
5496 ./ver003/237/230/4980737/21/198/4948021/7372947
28616 ./ver003/237/230/4980737/21/198/4948021/4948023
6948 ./ver003/237/230/4980737/21/198/4948021/7372812
8 ./ver003/237/230/4980737/21/198/4948021/7372830
5064 ./ver003/237/230/4980737/21/198/4948021/7372867
46136 ./ver003/237/230/4980737/21/198/4948021
46140 ./ver003/237/230/4980737/21/198
46396 ./ver003/237/230/4980737/21
788 ./ver003/237/230/4980737/62/198/4948062/4948234
24 ./ver003/237/230/4980737/62/198/4948062/7372804
160 ./ver003/237/230/4980737/62/198/4948062/4948102

 

 

1 answer

0 votes
Moses Thomas
Community Champion
May 26, 2020

@ELIZABETH_JOHN  Which mechanism are you using for Back up ?

ELIZABETH_JOHN May 26, 2020

We are taking a DB back up using sql dump and taking a back up of attachments folder. We are not using the XML back up from confluence 

Moses Thomas
Community Champion
May 26, 2020

@ELIZABETH_JOHN

So perfect,  sql_dump  will preserve all  data integrity  you don't the to worry about any thing,  and  there are two important  folders  you also need to  take back up.

 You also need  a mechanism that will make a copy these folders to some separate storage  as back up,  the copy mechanism  for instance in Linux is "cp" command will do the copy in its own order and will preserve data integrity.  You don't need to  worry about  confluence.cfg.xml it is just  few megabytes

<confluence_home>   //attachment are stored here
<confluence_installation_folder>

You can decide to  keep  these folders for some time and delete them when new ones will be created(copied) you can have a simple script to  do  as a  job via crontab  not to occupy  space.

In my case i use veeam backup  and i make whole backup of the DB host  and Confluence host.

 

Kind regards,

Mo

Karthik Ramachandran May 26, 2020

Referring to original query, is there a reason why table "attachmentdata" in db is empty? Ideally any attachments if stored in filesystem may have a metadata reference in db table. Not sure if the table referenced is correct (or) there is a different design confluence follows. Based on that if DB backup is taken earlier than attachments folder, attachments folder may have extra file. The opposite would be like DB has reference but not the actual file system causing missing content.

Moses Thomas
Community Champion
May 27, 2020

@ELIZABETH_JOHN @Karthik Ramachandran   Let me further explain, of-course  the metadata table will be empty  why ?  first of all what is a metadata ?  means the data that provide a structured description about some other data. From a programmer's point of view, database metadata refers to data about database data or, more elaborately, the information about tables, views, column types, column names, result sets, stored procedures, and databases.

Confluence does not store attachments on the database, so metadata is simply empty.

earlier versions allow us to store attachment in the database but for the latest version you cannot.  You can read more here Attachment Storage Configuration 

If  you want to know more about the algorithm behind attachment storage  see here

Hierarchical File System Attachment Storage 

 

Kind regards,

Moses

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events