hot backup with prometheus 2.0?

635 views
Skip to first unread message

californi...@gmail.com

unread,
Nov 15, 2017, 1:13:27 AM11/15/17
to Prometheus Users
I can find the followings in the article "Sneak Peak of Prometheus 2.0" at https://prometheus.io/blog/2017/04/10/promehteus-20-sneak-peak/

"It also paves the way to add features such as hot backups."

I would like to know what this means. I need to backup metrics data that prometheus scraped without stopping prometheus itself. I understand I need to stop prometheus to keep consistency of data store.

Brian Brazil

unread,
Nov 15, 2017, 2:53:14 AM11/15/17
to 若林耕平, Prometheus Users
On 15 November 2017 at 06:13, <californi...@gmail.com> wrote:
I can find the followings in the article "Sneak Peak of Prometheus 2.0" at https://prometheus.io/blog/2017/04/10/promehteus-20-sneak-peak/

"It also paves the way to add features such as hot backups."


Try doing:
with the admin API flag enabled.

There's no longer a need to stop Prometheus.

--

californi...@gmail.com

unread,
Nov 15, 2017, 9:47:35 PM11/15/17
to Prometheus Users
Thank you. I have some questions.

1. Each snapshot seems to include all files in /data directory. Out prometheus will have over 500GB data to snapshot. Question is how the size of data affects snapshot. Duration of hot backup will be longer and that might lead to some performance issue such as memory usage. If it is not unwise to take snapshot of that size, I should think of using remote read/write that is in experimental state in production.
2. How can I resotre data from snapshot? just put files into data directory and start prometheus?


Brian Brazil

unread,
Nov 16, 2017, 4:06:46 AM11/16/17
to 若林耕平, Prometheus Users
On 16 November 2017 at 02:47, <californi...@gmail.com> wrote:
Thank you. I have some questions.

1. Each snapshot seems to include all files in /data directory. Out prometheus will have over 500GB data to snapshot. Question is how the size of data affects snapshot. Duration of hot backup will be longer and that might lead to some performance issue such as memory usage. If it is not unwise to take snapshot of that size, I should think of using remote read/write that is in experimental state in production.

It's using hardlinks, so it's much cheaper than that.
 
2. How can I resotre data from snapshot? just put files into data directory and start prometheus?
 
Yes.

Brian 


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/72a6e716-addc-43ad-beef-093afb6498fa%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Message has been deleted
Message has been deleted

californi...@gmail.com

unread,
Nov 17, 2017, 1:19:03 AM11/17/17
to Prometheus Users
I misunderstood what hard link is. let me deleted former questions and post newer ones as follows:

How can I know job to create hard link on shapshot directory? I would like to make sure that hard links are fully created before starting a file copy job to move snapshot to backup disk.

Ben Kochie

unread,
Nov 17, 2017, 2:03:49 AM11/17/17
to 若林耕平, Prometheus Users
On Fri, Nov 17, 2017 at 7:19 AM, <californi...@gmail.com> wrote:
I misunderstood what hard link is. let me deleted former questions and post newer ones as follows:

How can I know job to create hard link on shapshot directory? I would like to make sure that hard links are fully created before starting a file copy job to move snapshot to backup disk.

The snapshot API call is blocking, when the HTTP request completes, the snapshot is ready.
 

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.

Goutham Veeramachaneni

unread,
Nov 17, 2017, 2:08:14 AM11/17/17
to Prometheus Users
Hi,

This video will hopefully make it clear: https://www.youtube.com/watch?v=15uc8oTMgPY When you call the snapshot API, it will create the snapshot and returns the foldername. The API call won't take more than a few seconds to complete and once the API call returns, the snapshotting is complete and you can go ahead and move the snapshot.  

Thanks,
Goutham

californi...@gmail.com

unread,
Nov 17, 2017, 10:18:35 AM11/17/17
to Prometheus Users
Ben and Goutham,

Thank you for your comment. I could understand how it works.
Reply all
Reply to author
Forward
0 new messages