Archive name macros not exported to dar command
Brought to you by:
jkerrb
When exporting dar command the archive name macros
aren't converted to the date aequivalent. This is very
annoying since you have to edit by hand the generated shell
script every time you make changes in the the profile.
How to reproduce:
1. Create archive
2. Choose name with name macros, e.g.
foo_%date__%hour_%minute
3. Export dar command
Result in *.sh:
-c "foo_20050917__13_06"
But to generate dynamic file names it should be
-c "foo_"`date +%Y_%m_%d__%H_%M`
Logged In: YES
user_id=888482
Actually, this is not a bug. You should submit a feature request. It is
not a priority for me at the moment, since the dar-export command
was intended to make it easy to reproduce a given backup with dar,
or to help debug KDar. The idea is that you save the .sh command
with your archive, so that you can see which options were used to
create the archive.
There are at least two ways of making the exported command
substitute dates automatically.
Just enter the unix date macros directly: the KDar macros are
different, so there is no ambiguity. I've checked this with KDar-2.0.6
and it works. Enter your archive name without the double-quotes, but
with everything else. You get a strange-looking archive name if you
create the archive within KDar, but at least you can export the dar
command and it works properly from the command line.
Alternatively, you could create a shell script that utilizes sed to
replace the KDar macros with the unix date macros. This takes more
skill than the first method.
Cheers,
JB