On 1 Cze, 18:45, Alexander Zaycev <mailof...@gmail.com> wrote:
> There is a script to create a backup, with the standard line:
> git archive --format=tar --prefix=project/ HEAD | gzip >
> my_git.tar.gz
> When run manually it works fine, but cron creates a bad archive (size
> 20 byte).
> In what may be the problem?

in crontab use absolute paths and 'cd' , and add MAILTO to see errors,

0 2 * * * cd /my/project; /usr/bin/git archive --format=tar --
prefix=project/HEAD | /usr/bin/gzip > /my/backup/my_git.tar.gz

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to