Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Implement backups #4

Closed
fabxc opened this issue Mar 14, 2017 · 1 comment
Closed

Implement backups #4

fabxc opened this issue Mar 14, 2017 · 1 comment

Comments

@fabxc
Copy link
Contributor

fabxc commented Mar 14, 2017

Our design generally allows easy backups. Necessary steps for this are:

  1. Disable compactor temporarily
  2. Create a backup directory that hard-links to all existing block files
  3. Snapshot() method that allows compacting current in-memory blocks into fully persistent blocks (not strictly necessary but nicer than backing up write-ahead log segments)
  4. Re-enable compactor so we don't ramp up memory during 5. – because all compaction actions replace old files rather than modifying, the inodes the hard links point to remain valid
  5. An external tool, e.g. rsync, can copy the backup directory somewhere safely and delete the directory

To disable/enable the compactor and trigger snapshots we can simply rely on the using application to make the method accessible or provide an optional convenience HTTP server in the tsdb directly.

@gouthamve
Copy link
Collaborator

Closed via #88

krasi-georgiev referenced this issue in krasi-georgiev/tsdb Nov 20, 2018
krasi-georgiev referenced this issue in krasi-georgiev/tsdb Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants