Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stash Datacenter restored from DIY backup

Anand Meyyappan August 6, 2015

We customized DIY backup script that take backup of Postreges database using pg_dump and Stash "shared" folder present inside stash home directory. Other folders and files inside stash home are not taken backup for three reasons, one they are only temp files, logs, and cache data also not suggested by atlassian to include in the backup of stash home directory, two it may vary between multiple instances of stash datacenter, three our shared folder inside stash home is NFS mounted and has ability take snapshot backup that is pretty fast and we don't care other files in stash home for reason one & two.

When we restore Stash from back, we create empty stash home directory and copy shared folder inside home from our backups. Postgres database is restore using standard pg_restore procedure. Once we start Stash on these restores, we see Stash home directory's temp files & folders are automatically populated except changing anything on "shared" folder, also Stash is started as usual.

However above experimented restore procedure is not documented as is on Atlassian restore documentation from DIY backups. I would like to know from Atalassian, Am I missing anything in the above explained backup and restore process that will create serious impacts down the line.

If it looks a standard way to do, can this be documented on DIY backup store documentation for other reference?, because pretty useful to know for Stash datacenter backup and restore process.

2 answers

1 vote
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2015

Hi @Anand Meyyappan,

everything you have described in your question sounds reasonable. 

It also sounds a lot like what the Stash DIY Backup scripts do for you already. 

If you use stash.diy-backup.sh to backup a Postgres database, the script will do it using pg_dump. One thing you did not mention is locking Stash before doing your backup. If you are using/building off of the provided scripts, this will be done for you.
Snapshotting the NFS mount (with only the shared folder) is fine, as long as you do not care about losing your instance's logs.  - You indicated you don't care about that.

Likewise if you restore a postgres backup using the stash.diy-restore.sh script, it will use pg_restore to restore the database. As you correctly identified, Stash will start with just the shared directory in place, and reconstruct the rest of the home directory when it is started.

It sounds like you are manually doing what the backup and restore scripts automate, but everything is valid and you should not have any issues continuing with the backup & restore procedure you've described.

As for documentation: all this is "documented" in the scripts - due to the various different configurations Stash can be run with, it does not make sense to document each case individually - that's why it's called the "do-it-yourself" backup - you've ultimately got full control of what and how you want to backup. The scripts provided should serve as a helpful starting point for that.  

I hope this helps,

Felix

0 votes
Anand Meyyappan August 7, 2015

Hi Flex, 

Thank you for your comments.

The DIY scripts that we have are actually customized from DIY backup scripts (Bash scripts) offered by Atlassian's open-source development on bitbucket. So we have all the locking, unlocking, backup progress notification, etc., from upstream implementation. We changed tool that backup stash home, and backup only the shared folder inside home directory.

-Anand

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events