Hello Michael,
On 2013-07-29 17:06, Michael Wessel wrote:
I installed Piler last night to check it out and test it and have it
all up and running now.
So far I like it a lot (though I had to jump through a few hoops to
get it all working).
share with us, and I'll review the install procedure to fix them
One question I have is how do I backup and restore? It's listed as a
feature but not documented from what I have seen.
Is it a simple matter of rsyncing the /var/piler directory? And in
case a restore is needed I just put it all back and it'll work (plus
the database of course)?
Is there a recommended procedure?
piler has 3 kinds of data:
- emails (/var/piler/store)
- sphinx database (/var/piler/sphinx)
- mysql database
in order to make a backup you have to save these data. If you can see
/var/piler/store/00 then you may find directories like 51b, 51c, 51d,
...
They come from the timestamp, and each of them contains ~12 days of
emails,
so you don't have to rsync old dirs since they don't change any more.
It's also a good idea (although it depends on your setup) to create a
mysql
replica, so you have kinda backup of your database.
Sphinx has fewer although bigger files.
However there's another approach: to export emails (with pilerexport),
then in
case of a restore, you can import them (with pilerimport).
pilerexport is able to retrieve all emails of the given day to the
current
directory, eg, pilerexport --start-date 2013.07.29 --stop-date
2013.07.29
Then you can move it to tape, etc. This latter approach is a more
lightweight
one, you have to deal with less data, however a complete restore takes
more time.
And a minor issue - the health monitor permanently shows a red bar
and no text for the CPU usage. The cron job is set up and seems to
produce the correct result:
cat /var/piler/stat/cpu.stat
99.43
Regardless of the value in cpu.stat all I see is the red bar.
Any ideas?
Try replacing $11 with $10 in piler's crontab.
Janos