Automating Acronis Backups using Windows Script files.

Discussion in 'Acronis True Image Product Line' started by Ron57, Jun 13, 2005.

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

    Ron57 Registered Member

    Joined:
    Nov 30, 2004
    Posts:
    11
    I know nothing about Windows Script files, but this is what I want to do.

    1. Use the Acronis Scheduled Tasks to make an incremental backup weekly with the default name Mybackup.tib. Acronis will name the first file Mybackup1.tib. The next file will be named Mybackup2.tib, etc.

    2. Once a month, on the first day of the month, rename the backup files to reflect the month. For example, on June 1, rename the following files:
    Mybackup1.tib to Bkup-2005-05-1.tib
    Mybackup2.tib to Bkup-2005-05-2.tib
    Mybackup3.tib to Bkup-2005-05-3.tib
    Mybackup4.tib to Bkup-2005-05-4.tib, etc.

    3. If I could do this I would not have to change the Acronis Scheduled Tasks every month in order to make a full backup with limited number of incremental backups.

    Does anyone have such a script written?

    Ron Spruell
     
  2. MiniMax

    MiniMax Registered Member

    Joined:
    Mar 17, 2005
    Posts:
    566
    Code:
    @       echo off
    
            for %%N in (1 2 3 4 5 6 7 8 9) do (
                if exist Mybackup%%N.tib ren Mybackup%%N.tib Bkup-%DATE:~3,7%-%%N.tib
            )
    
     
  3. Ron57

    Ron57 Registered Member

    Joined:
    Nov 30, 2004
    Posts:
    11
    MiniMax -

    It took me a while to determine that this was not a .vbs file, but instead a .bat file.

    After I determined that, I could not get the date part of the command to work. The error I get is "The syntax of the command is incorrect".

    Your date format must not be mm/dd/yyyy. I got the following to work.
    -----------------------------
    Acronis Backup file Rename.bat
    @ echo off

    for %%N in (1 2 3 4 5 6 7 8 9) do (if exist Mybackup%%N.tib Ren Mybackup%%N.tib Bkup-%DATE:~10,4%-%Date:~4,2%-%%N.tib)
    ------------------------------
    Now to get Microsoft Task Scheduler to run this file once a month.

    Ron Spruell
     
  4. TonioRoffo

    TonioRoffo Registered Member

    Joined:
    Apr 23, 2005
    Posts:
    237
    I've got a similar thing going, called TiRoll. It *doesn't* rename anything, that was something I need for my purposes.

    It uses NTFS reparse points to point Acronis to another backup directory each month. You can specify how many months must be kept, at the start of the new month, the oldest directory gets cleared.

    Something like that you are looking for?
     
  5. MiniMax

    MiniMax Registered Member

    Joined:
    Mar 17, 2005
    Posts:
    566
    I am OLD and stuck in the world of BAT/CMD-scripts and C-programs :)
    That's what you get from using such an illogical date format as mm/dd/yyyy. Learn Danish and you will be able to use a version of Windows where the date format is much more logical and suitable for automation and sorting: yyyy-mm-dd.

    J/K :D
     
  6. Maniac8888

    Maniac8888 Registered Member

    Joined:
    Jun 22, 2005
    Posts:
    1
  7. beenthereb4

    beenthereb4 Registered Member

    Joined:
    Jun 29, 2004
    Posts:
    568
Thread Status:
Not open for further replies.