Command file to rename scheduled backups

Discussion in 'Acronis True Image Product Line' started by shieber, Apr 17, 2006.

Thread Status:
Not open for further replies.
  1. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Does anyone have a command file that can be run as a post command to uniquely rename scheduled backups, like maybe append a date-string to the name or something like that, so that scheduled backups don't keep overwriting.

    Thanks,
    sh
     
  2. Menorcaman

    Menorcaman Retired Moderator

    Joined:
    Aug 19, 2004
    Posts:
    4,661
    Location:
    Menorca (Balearic Islands) Spain
    Hi shieber,

    Perhaps one of MiniMax's suggestions in these two earlier threads could be suitably adapted/utilised:

    <variables in backup name>
    <Automating Acronis Backups using Windows Script files>

    Regards
     
  3. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Yes, I finally got the batch file right. So that's basically what I'm doing. Putting the date, parsed, into environment variable as a string and then appending that to the filename.

    I did run into a little inconvenince though. IF verify after backup is turned on, then Verify runs after the post command. That means it won't find the file because the post command changed the name. However, since ATI runs the post command before the verify, it won't allow the post command to rename the file, presumably because it's held open so for the upcoming verify. I can only assume that Minimax assumed that verify-after-backup would be turned off.

    It works if the verify-after-backup is turned off -- but that seeems a shame. I'd like to runthe post command after the verify.

    sh
     
  4. TonioRoffo

    TonioRoffo Registered Member

    Joined:
    Apr 23, 2005
    Posts:
    237
    Another method is using different maps for your backups, and using sysinternals "junction" - point another map towards one of these maps.

    Junction can be regarded as hard-links for NTFS.

    So you have a map

    C:\backup

    and using batch commands you can junction this backup map so it points to c:\backupJan or C:\backupFeb or C:\backupWeek5... without the need for more backup jobs, or renaming - you'll just need a way for your batch to point to the right map at the right time...

    Renaming isn't the way to go if you need incremental BU's, it won't find your main backup anymore...
     
  5. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Thanks. As I see it, it's not that renaming is a problem, I can rename, I just can 't have the Verify auto run. Maybe I need to put verify into some kind of batch job.

    We were going to set up diff directories for diff daily backups but it was rather onerous to have a months worth of commands runnign a month's worth of batchfiles. I'm not sure finding using an external to change the directory (changing the target filemanem?) will help much.

    What I have is basically an elegant 4 line batch file that stores the date, checks for the backup, removes any old file with the same date already attached, and renames the new backup file. filenames are unique for a month and then overwrite so that I don't run out of space. I could have made them unique for a year or for forever, but I don't need backups that long but I need them everyday.

    sh
     
  6. Menorcaman

    Menorcaman Retired Moderator

    Joined:
    Aug 19, 2004
    Posts:
    4,661
    Location:
    Menorca (Balearic Islands) Spain
    The verify-after-backup (or restore) feature and Pre/Post commands were first introduced in TI 9. However, MiniMax's posts are dated May and June 2005, which pre-dates TI 9 by a country mile :).

    Regards
     
  7. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    In the scheduled tasks youe mean? Could be. I didn't have need to use them before this week.

    sh
     
  8. Menorcaman

    Menorcaman Retired Moderator

    Joined:
    Aug 19, 2004
    Posts:
    4,661
    Location:
    Menorca (Balearic Islands) Spain
    Yes. Prior to TI 9.0, the only thing you could accomplish via the task scheduler was basic disk/partition image creation.

    Regards
     
  9. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Renaming the files AFTER the fact might cause a problem with incremental/differential backs, depending on how TI implements things.

    If their implementation is robust, then there should be an encoding of the filename within the incremental/differential files.

    However, there's no reason to be concerned, as we can always change the filename BEFORE a task runs.

    I was thinking of producing a program for just this purpose.

    Would that do what the OP is requesting?
     
Thread Status:
Not open for further replies.