[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] Error when running as a daily job
From: |
Michael Johnson |
Subject: |
Re: [Duplicity-talk] Error when running as a daily job |
Date: |
Fri, 28 Jul 2006 15:47:51 -0400 |
After months of head scratching, I've finally solved this in my
situation. It's surprisingly easy and the answer was staring me in
the face the whole time.
When run from cron, the environment variables are slightly
different. I tried running it manually as root and removing a
variable one-by-one until it failed. Sadly it never failed until I
removed all the variables. I had the right idea, but the wrong method.
Now, in my crontab, I use:
10 3 * * 1 root su -c /etc/duplicity/backups.weekly.bash
where before I had:
10 3 * * 1 root /etc/duplicity/backups.weekly.bash
Since it ran fine when done manually, I just tricked cron into
running it manually, sort of. See man su for more information on the
-c option.
Anyway, that fixed it for me. If any of you have not yet given up on
this and are still looking, this might fix it for you as well.
-Michael
-------------------------------------------------------
What you can do, or dream you can do, begin it; boldness has genius,
power and magic in it.
- Johann Wolfgang von Goethe