Backup using Duply - cron task not starting

nabuhonodozor

Renowned Member
Feb 14, 2010
35
1
73
Hi,
I am using duply to make backup from ProXmox hostnode to an external ftp server.
Ive configured and use Duply from command line issuing following command:
Code:
duply vzbackup backup
It works beautifully.

I try to put this into cron to make backups automatic daily 4.10 am.
Ive created a file duply and place it in etc/cron.daily
It have the same permissions as other files in this directory.
In this file Ive put:
Code:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
10 04 * * *    root duply vzbackup backup
It didn't worked.
Ive tried to put the file in cron.d - it didnt worked either.
Ive tried to change the command to :
Code:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
10 04 * * *    root /usr/bin/duply vzbackup backup
Theres no entry in daemon.log about my backups (but there are vzdump entries made by proxmox backup settings).

Could You help me find a solution to this.
Kind regards,
Piotr
 
Code:
May  6 04:09:10 ns364041 kernel: IPv6 addrconf: prefix with wrong length 56
May  6 04:10:01 ns364041 /USR/SBIN/CRON[16512]: (root) CMD (/usr/local/rtm/bin/rtm 56 > /dev/null 2> /dev/null)
May  6 04:10:01 ns364041 /USR/SBIN/CRON[16514]: (root) CMD (test -x /usr/lib/atsar/atsa1 && /usr/lib/atsar/atsa1)
[B]May  6 04:10:01 ns364041 /USR/SBIN/CRON[16518]: (root) CMD (duply vzbackup backup)[/B]
May  6 04:10:01 ns364041 /USR/SBIN/CRON[16519]: (root) CMD (/usr/share/vzctl/scripts/vpsreboot)
But Ive checked and FTP is empty.
 
DEar Dietmar,
It worked once but stoped now. I dont have any duply entries in syslog now.
Simply cron don't read this cronjob file.

It is strange - do I do this correctly? Cron needs restart?
Ice created a file duply in etc/cron.d/
It have the same permission and owner as other files in this directory.
File duply have this inside:
Code:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
46 07 * * *           root duply vzbackup backup
and it simply dont start the duply backup job.
When I issue this command from commandline it works flawlessly.


Please help,
Piotr
 
Yes, I know thats why the file is simply named "duply".
Its weird it dont start and theres no errors in syslog.
 
just for fun

remove the duply file and then as root

crontab -e

and insert the same values

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
10 04 * * * root /usr/bin/duply vzbackup backup 2>/tmp/report 1>&2

save the file

then, after the desired backup, take a look at the /tmp/report

Diaolin
 
Diaolin! It worked! Thank You.

As a note - In crontab I had to remove "root" in front of a command.
Thanks again!
Piotr
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!