Closed
Bug 805861
Opened 12 years ago
Closed 12 years ago
create a script to save an index
Categories
(Marketplace Graveyard :: Search, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-11-15
People
(Reporter: tarek, Assigned: jason)
References
Details
ES Indexes take a long time to build, we should start to use the snapshot feature in case something goes wrong on a reindexation
Reporter | ||
Updated•12 years ago
|
Target Milestone: --- → 2012-11-01
Reporter | ||
Comment 2•12 years ago
|
||
it's a devops bug ? :) I guess we need to : 1/ try out the snapshot feature on -dev [ops] 2/ build a script that calls this feature [dev] 3/ hook it in the reindex command [dev]
Reporter | ||
Comment 4•12 years ago
|
||
From IRC: < oremj> tarek: I think we are using the default gateway < oremj> and the snapshot docs say they don't work with the default gw < oremj> sounds like a snapshot with the default gateway just means copying the storage I guess we could provide a system script to run this backup, we can invoke from Django's command machinery.
Assignee | ||
Comment 5•12 years ago
|
||
I created a script that tars the index data on each node for a specified index [1]. It takes around 5 minutes to backup addons_dev index and 45 minutes to backup addons_dev_stats index. To perform a restore we will need restore the tar on each node and perform a full cluster restart. I will be testing the restore tomorrow from 6AM-7AM PST. [1] https://gist.github.com/4035724
Updated•12 years ago
|
Target Milestone: 2012-11-01 → 2012-11-15
Assignee | ||
Comment 6•12 years ago
|
||
During today's testing I performed the following on the addons dev/stage elasticsearch cluster: 1. Created a backup of addons_dev-20121024062906 index using script. 2. Deleted addons_dev-20121024062906 from elasticsearch. This broke addons-dev.allizom.org search. 3. Stopped elasticsearch on all nodes. 4. Restored backup of addons_dev-20121024062906 index to elasticsearch. 5. Started elasticsearch on all nodes. Verified addons_dev alias and addons_dev-20121024062906 index is available in elasticsearch. 6. Tested addons-dev.allizom.org search, looks okay.
Reporter | ||
Comment 7•12 years ago
|
||
cool! out of curiosity, how big is the backup ? can we do this every day ?
Reporter | ||
Comment 8•12 years ago
|
||
(this == 1.)
Assignee | ||
Comment 9•12 years ago
|
||
(In reply to Tarek Ziadé (:tarek) from comment #7) > cool! > > out of curiosity, how big is the backup ? can we do this every day ? Compressed addons_dev index is ~400MB, addons_dev_stats is ~4GB. We can configure this via cron to run every day and remove backups older than 7 days. How does that sound?
Comment 10•12 years ago
|
||
(In reply to Jason Thomas [:jason] from comment #9) > (In reply to Tarek Ziadé (:tarek) from comment #7) > > cool! > > > > out of curiosity, how big is the backup ? can we do this every day ? > > Compressed addons_dev index is ~400MB, addons_dev_stats is ~4GB. > > We can configure this via cron to run every day and remove backups older > than 7 days. How does that sound? Sounds good to me
Assignee | ||
Comment 11•12 years ago
|
||
Added backup cron to dev/stage and prod for addons indices.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•