I have this really nice rsync backup script that I use to do rotating snapshot backups of my different Ubuntu servers to a single backup server.
I am now trying to use this same script on my Leopard machine, but it seems to have a serious problem with the following lines of code:
lday=`date +'image-%Y-%m-%d-%H' -d '1 day ago'`
lweek=`date +'image-%Y-%m-%d-%H' -d '1 week ago'`
The generate the following error:
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
It's clear that it doesn't like the -d '1 day ago' part in my code.
Is this solved differently in Leopard?
Could someone please help me out? I've be trying to research this for the past 8 hours, but can't seem to find any solution to this problem.
Thanks in advance.
I am now trying to use this same script on my Leopard machine, but it seems to have a serious problem with the following lines of code:
lday=`date +'image-%Y-%m-%d-%H' -d '1 day ago'`
lweek=`date +'image-%Y-%m-%d-%H' -d '1 week ago'`
The generate the following error:
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
It's clear that it doesn't like the -d '1 day ago' part in my code.
Is this solved differently in Leopard?
Could someone please help me out? I've be trying to research this for the past 8 hours, but can't seem to find any solution to this problem.
Thanks in advance.