Discussion:
[influxdb] Backup using cron
d***@gmail.com
2016-11-15 09:23:14 UTC
Permalink
Hi Guys,

I'm struggling with the following,

influxdb ver 1.0.2
OS EL7.2

Using the following to command to backup
influxd backup -database test /var/backups/influxdb

which works and it backs up all the meta and shards.

But using the same command in crontab or even cron file, I only get the meta backed up.
SO,

am I missing something obvious?

Thanks,
Danie
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/16571b1a-6f28-471c-bc6c-813746a5c67b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Larry Walker' via InfluxData
2016-11-15 18:49:50 UTC
Permalink
This is what I do.

$ crontab -l

30 2 * * * sudo /home/influxDbBackup.sh > /tmp/influxdbbackup.log 2>&1


Then inside the script it does the backup

sudo influxd backup -database mydb /backupdirectory &> backup.log
Can you share the actual crontab config?
Cron has no environment, unlike a user shell. Are you specifying the full
path for influxd? Perhaps there's a missing environment variable?
Post by d***@gmail.com
Hi Guys,
I'm struggling with the following,
influxdb ver 1.0.2
OS EL7.2
Using the following to command to backup
influxd backup -database test /var/backups/influxdb
which works and it backs up all the meta and shards.
But using the same command in crontab or even cron file, I only get the meta backed up.
SO,
am I missing something obvious?
Thanks,
Danie
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/16571b1a-6f28-471c-bc6c-813746a5c67b%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/b2e440f3-636b-4b6f-8737-5e7c0f22d78b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Danie van Zyl
2016-11-16 06:03:21 UTC
Permalink
Hi Sean,

I've figured it out eventually,

I've added the following environmental variables and it worked.

LC_CTYPE=UTF-8
LANG=en_US.UTF-8
PATH=/sbin:/bin:/usr/sbin:/usr/bin
LC_ALL=en_US.UTF-8
SHELL=/bin/bash
TERM=xterm





On Tue, 15 Nov 2016 at 19:16 Sean Beckett <***@influxdb.com> wrote:

Can you share the actual crontab config?

Cron has no environment, unlike a user shell. Are you specifying the full
path for influxd? Perhaps there's a missing environment variable?



On Tue, Nov 15, 2016 at 2:23 AM, <***@gmail.com> wrote:

Hi Guys,

I'm struggling with the following,

influxdb ver 1.0.2
OS EL7.2

Using the following to command to backup
influxd backup -database test /var/backups/influxdb

which works and it backs up all the meta and shards.

But using the same command in crontab or even cron file, I only get the
meta backed up.
SO,

am I missing something obvious?

Thanks,
Danie


--
Remember to include the version number!
---

You received this message because you are subscribed to the Google Groups
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to influxdb+***@googlegroups.com.


To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/16571b1a-6f28-471c-bc6c-813746a5c67b%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the version number!
---
You received this message because you are subscribed to a topic in the
Google Groups "InfluxData" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/influxdb/TcjVS4FjGrk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/CALGqCvPnJzyqkyetG1DzZ69Z0Rd65YpfBmzuW7GcHe68D5hskg%40mail.gmail.com
<https://groups.google.com/d/msgid/influxdb/CALGqCvPnJzyqkyetG1DzZ69Z0Rd65YpfBmzuW7GcHe68D5hskg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CAAZZXtPy%3DmpJWzf9qbckNM_UOuhyOk-LxUk5yTZWkCCOPjFSjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...