I'm creating a backup to run every day (at midnight), it'll backup to FTP.
The file on server is : /backup/%d-%m-%Y
I'm using the "one file per server" option for backup format, and I've checked: Do strftime-style time substitutions on file or directory name Transfer each virtual server after it is backed up
but when I click "save schedule" it says:
[code:1]Failed to save scheduled backup : An error was detected in the new Cron configuration :
@daily /opt/local/etc/webmin/virtual-server/backup.pl --id 123187495828131 crontab: error on previous line; unexpected character found in line. crontab: errors detected in input, no crontab file generated.
#
Rotate system logs# 10 3 * * * /usr/sbin/logadm # # # 15 3 * * 0 /usr/lib/fs/nfs/nfsfind 30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean #
The rtc command is run to adjust the real time clock if and when daylight savings time changes.# 1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1 #
Run Virtualmin based log rotation# 30 0 * * * /opt/local/sbin/logrotate -f /opt/local/etc/logrotate.conf #
Other Virtualmin Cron jobs# 54 11 * * * /opt/local/etc/webmin/cron/tempdelete.pl 0 * * * * /opt/local/etc/webmin/virtual-server/bw.pl 47 10 * * * /opt/local/etc/webmin/virtual-server/licence.pl 3 2 * * * /opt/local/etc/webmin/virtual-server/sendratings.pl 0 * * * * /opt/local/etc/webmin/virtual-server/fcgiclear.pl 44 22 * * * /etc/webmin/cron/tempdelete.pl @daily /opt/local/etc/webmin/virtual-server/backup.pl --id 123187495828131 [/code:1]
any ideas? Thanks! :)
Hi Peter,
Your above crontab looks good.
I'm curious, if you log into the server over SSH, and restart cron using this:
/etc/init.d/cron restart (on Ubuntu/Debian)
or
/etc/init.d/crond (on CentOS/RHEL)
And then, look at /var/log/syslog (on Ubuntu/Debian) or /var/log/cron (on CentOS/RHEL) -- are there any error messages when cron starts up?
That will tell us if the issue it's complaining about already exists in the crontab somewhere, or if something about the new line being generated is a problem.
If it's related to the new line being generated, the best way to resolve that is by filing a bug report (using the Bugs and Issues link below). If it's already in cron somewhere, then we can just track down the problem and fix up the entry that's causing issues.
-Eric
I'm running Solaris, not sure how to restart cron.
Also, I have other cron commands that are working fine. Weird?
If you have any ideas let me know, else I'll file a bug.
My Solaris VM is refusing to boot at the moment, so I'm struggling to give you what command to type to restart cron.
Rather than wait for me to debug my installation, I'd recommend just filing a bug so someone can look into that.
If I get this working, I may help out in with your request in the Bug Tracker, but Jamie will see your request there and will likely know whether this is a Virtualmin bug or a cron problem.
-Eric
done. ID: FS#5087
I'd appreciate a fix, but can appreciate you probably have more critical bugs :)
Cool!
Jamie is a bug fixing machine, he'll figure it out :-)
-Eric
also, and this isn't directly related but I'd appreciate the guidance.
Whats the best way to have backups? I want:
the last 10 days backups, and I also want to keep *one* backup from each month (probably the last backup of each month)
I'll back it up via FTP. It's only ~50Mb a night so size isn't really an issue.
Can I do this ?
Howdy,
Well, you can use the "Delete old backups" option in the "Scheduling and Reporting" section of your backup in Virtualmin, and set it to delete backups older than 10 days.
You might have to create a Cron job of some kind on your FTP server to grab a copy of a backup once a month and store it somewhere.
Personally, I have two backups scheduled, a full, and an incremental.
The full is stored in $SSH_SERVER/backups/weekly, and the incremental is stored in $SSH_SERVER/backups/daily_%d.
So I always have a full backup from the beginning of the week, and 30 days worth of incremental backups.
To do what you want, and store a copy of the full backup from each month, I'd create a Cron job on the FTP server that runs once a month and performs a copy of the data I'd like to keep.
-Eric
Howdy,
Well, you can use the "Delete old backups" option in the "Scheduling and Reporting" section of your backup in Virtualmin, and set it to delete backups older than 10 days.
You might have to create a Cron job of some kind on your FTP server to grab a copy of a backup once a month and store it somewhere.
Personally, I have two backups scheduled, a full, and an incremental.
The full is stored in $SSH_SERVER/backups/weekly, and the incremental is stored in $SSH_SERVER/backups/daily_%d.
So I always have a full backup from the beginning of the week, and 30 days worth of incremental backups.
To do what you want, and store a copy of the full backup from each month, I'd create a Cron job on the FTP server that runs once a month and performs a copy of the data I'd like to keep.
-Eric
i have this exact same problem on joyent accelerator sun solaris .... it gives this error
any suggestions on how to get the daily backup working would be greatly appreciated!
@daily /opt/local/etc/webmin/virtual-server/backup.pl --id 126954757518513 crontab: error on previous line; unexpected character found in line. crontab: errors detected in input, no crontab file generated.
Howdy,
You can see the bug that was posted here:
https://www.virtualmin.com/node/3701
The answer was:
Solaris doesn't support Cron schedule specifications like @daily.
The bug is that Virtualmin shouldn't even offer this option on Solaris. The work-around is to select on the backup form the 'Complex schedule' option, click the ... button next to it, select a schedule, then click OK
thanks for the advice, i'll sort that.
Can you run incremental backups with Virtualmin? that'd be awesome :)
<div class='quote'>Can you run incremental backups with Virtualmin? that'd be awesome :) </div>
Definitely!
When you go to create a new backup schedule, in "Destination and format", check out the "Backup level" option.
"Full" is the default, but you can set it to "Incremental".
-Eric
May be that problem is related to FS#5112: Since Virtualmin 3.65 all my cheduled backups failed with an error like this:
Uploading archive to FTP server ..
.. upload failed! STOR /backup/2009-01-23/domain.tld.tar.gz failed : /backup/2009-01-23/domain.tld.tar.gz: No such file or directory
No, it isn't. I just discovered my backup space exceeded although I enabled deletion of old backups after 30 days.