duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] duplicity and crontab


From: Robert Krig
Subject: Re: [Duplicity-talk] duplicity and crontab
Date: Mon, 9 Nov 2020 14:40:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Cron jobs run with a reduced environment in comparison to your standard bash shell. e.g. I think they actually run with sh rather than a full bash. But definitely with a minimal PATH environment. So you will probably want to include a PATH directive in your shell script. Simply copy the output of:

env | grep PATH

into your shell script. Put that line before you run any actual shell comands in your script.
It might also help if you include a bash header in your script, e.g.

#!/usr/bin/env bash

or something like that.
You could also include a "pipe to logfile" option in your crontab entry, e.g.:

00 02 * * * /command/to/run.sh > logfile.log






On 06.11.20 12:45, Giuliano Franchetti via Duplicity-talk wrote:
Hello to all, 

I have made a shell script to perform a backup with duplicity, the script works well if I run it from xterm. 
However, when I try to run the script with cron for automatising the backup something does not work 
with duplicity. I looked in the web but it is not clear what is the way out. 

Has anyone succeeded to do this? 

Thanks 

Giuliano


_

Giuliano Franchetti

Storage Rings/ Accelerator Operations

Office:         C26 1.019
phone:       +49 6159 71 1535
fax:             +49 6159 71 3099
e-mail:        G.Franchetti@gsi.de
http://web-docs.gsi.de/~giuliano 

GSI Helmholtzzentrum für Schwerionenforschung GmbH
Planckstraße 1, 64291 Darmstadt, Germany, www.gsi.de

Commercial Register / Handelsregister: Amtsgericht Darmstadt, HRB 1528
Managing Directors / Geschäftsführung:
Professor Dr. Paolo Giubellino, Dr. Ulrich Breuer, Jörg Blaurock
Chairman of the Supervisory Board / Vorsitzender des GSI-Aufsichtsrats:
State Secretary / Staatssekretär Dr. Georg Schütte

Commercial Register / Handelsregister: Amtsgericht Darmstadt, HRB 1528
Managing Directors / Geschäftsführung:
Professor Dr. Paolo Giubellino, Ursula Weyrich, Jörg Blaurock
Chairman of the Supervisory Board / Vorsitzender des GSI-Aufsichtsrats:
Ministerialdirigent Dr. Volkmar Dietz





_______________________________________________
Duplicity-talk mailing list
Duplicity-talk@nongnu.org
https://lists.nongnu.org/mailman/listinfo/duplicity-talk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]