Guillem Liarte
unread,Oct 3, 2013, 5:00:13 AM10/3/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
When I have an stanza such as this:
copy:
/path/to/filename
dest=/path/to/dest/filename
owner=me
group=mygroup
mode=644
backup=timestamp
I get that the file is backed up as:
filename_1380788884_Thu_Oct__3_10_28_04_2013_.cfsaved (wat?)
I have been looking for days for a way to change these timestamps to something like:
filename_042810_03102013
Or any other thing that is not splitting the date and placing the time in the middle.
Does anybody know how to achieve this? In Puppet for example I created a fact that would give me the exact time stamp and I could append it to the backup string.
I cannot use anything else than CFEngine v2, I cannot upgrade to v3, but custom scripts and functions are welcome.
I could assign a variable with the timestamps that I can obtain from the system by ruining a command, but how do I get CFEngine to backup using that custom timestamps instead of the ugly one that comes out of the box?
Many thanks in advance.