View Full Version : using variables in Filename
bernr
August 12th, 2006, 08:58 AM
Is it possible to use variables in file names? Basically I want a schedule where every morning @ 3am a full backup is run named with today’s date, then throughout the day I will be running either differentials or incremental. I though about using a pre or post command to rename the backup, but this would not work since if I rename the previous backup it would not be able to find it for the current.
So what I would like to do is have a file name like e:\backups\%date:/=.%.tib
Is there any way to do this? I really do not want to make 30 different backup schedules (1 full backup and 5 diff or inc backups throughout the day 5 days a week)
Bern
bernr
August 15th, 2006, 10:17 AM
any suggestions?
bottom
August 15th, 2006, 11:51 AM
...you basically would need only 1 variable: "day"
e.g. the number of the current day of month
15. August -> day = "15"
(of course it would also be possible
to use e.g. "tuesday" or something else)
A) before backup starts (using pre-commands)
- get current "day" out of current date
- look for a subfolder with the name "day"
- if it doesn't exists create it
- otherwise open it and look for tib archives inside
- move these archives up one folder level
(so now archives should reside at the place
where TI is looking for them)
B) TI creates new (full/incremental/...) archive (hopefully)
C) after backup is finished (using post-commands)
- get current "day"
- look for a subfolder with that name
- if it doesn't exist create it
- move all tib archives there
would have tried this myself,
but (at least) post-commands
DOESN'T work for me at all !
bottom
Menorcaman
August 15th, 2006, 12:31 PM
Hello Bern,
Perhaps MiniMax's solution at Post #8 in this previous thread titled <variables in backup name> (http://www.wilderssecurity.com/showthread.php?t=78404) provides a suitable workaround.
Regards
vBulletin® Copyright ©2000-2012, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2012, Wilders Security Forums