problems when archive is full

Discussion in 'Acronis True Image Product Line' started by BobD, Feb 1, 2008.

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

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    Acronis®*True*Image*Home® version 11.0 (build*8,053)

    I have a number of Backup Locations defined and each is limited by the Number of Backups. This should cause automatic deletion of the oldest files when the count is exceeded. This is unreliable. Sometimes it deletes and other times not. Also when this count is exceeded TI11 seems to create another Full Backup (with a weird name) even though it has just completed a Differential Backup. One time it looped and created multiple extras and was still running 3 hours later. All normal backups for me complete in less than 30 minutes including automatic verification. I have tried limiting the Backup Location by Size, Count or Date and none works satisfactorily.

    Anyone else experiencing similar problems?
    Bob
     
  2. hmmsjan

    hmmsjan Registered Member

    Joined:
    Jan 21, 2008
    Posts:
    9
    Hello Bob,

    Yes, I've exactly the same experiences. Intention is to do another differential backup lasting a couple of minutes, but if one of the limits is triggered, a consolidation might start which lasts for hours. For the moment I try the option to make a new full backup after a number of differentials and I do not use the limits.
    But I have to delete the old backup sets by hand, I think, but I want that the system manages itself.
    For me a reason to ask in another thread whether it's possible to do the backup management by a script on the (Linux-based) storage server without upsetting the ATI11 manager. Another possibility would be to use the "Execute after" option
    to execute a VBscript to manage the backup files in a sensible way, but that's something I've to figure out.



    Greets,
    Henny
     
  3. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    Henny, thanks for the response. I had thought that the only way to correct for the deficiencies of the product was to do an Execute Before or After script but this requires me to do some learning. It also may be tricky because I use a 7 day cycle of a full backup followed by 6 differential backups for the larger ones. That would require me to search the folder for associated backup files.

    I thought I might try Microsoft's free PowerShell. MS says it is more powerful and easier to use than VB scripts. They have a lot of examples available also. If you find a solution please let me know.....Bob
     
  4. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    As another idea/option, you might take a look at this thread and the posts by jeremyotten.

    Basically, it's a rolling weekly rotation (4 weeks) with Incrementals. The script is written for network use, but the basics are the same for local rotations. It could be modifed for use with an internal/external drive. No changes would need to be made to use Differential backups as it's just rotating the folders.
     
  5. hmmsjan

    hmmsjan Registered Member

    Joined:
    Jan 21, 2008
    Posts:
    9
    I once heard of powershell, as long it has file management available it's fine I think. I'll post my solution here. Hope to have a little bit time next week.....

    Kind Regards,
     
  6. hmmsjan

    hmmsjan Registered Member

    Joined:
    Jan 21, 2008
    Posts:
    9
    OK, this is already moreorless what I can try. I've just to add some code to
    preserve the acronis.cfg file for the backup location, but in effect the whole
    backup location principle is not needed here..... Also due to moving and deleting whole directories, erroneous backups simply vanish....


    Thanks for the tip!
     
  7. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    MudCrab, thanks for the info about the script.

    I dont have a server in my environment so I am going to have to reliably run the script on Mondays before any backups. I normally power up my machine at 0600 daily and the Acronis backups run at 0630 but I have to allow for the times when my machine does not get powered up on a Monday and then run the script before any backup activity. I looked at Windows Scheduled Tasks to run the script but it does not seem to be suitable.

    I thought of scheduling a dummy Acronis backup at 1 minute past midnight on Monday mornings with the option of running it at the first boot up after that time. This dummy run would submit the script as an Execute After option so that Acronis would not interfere with the folder renamings. Then the real backups would be run after that as normal.

    This is all theory so far and any suggestions or corrections are welcomed.
    edit
    It could get interesting if my machine did not get switched on for a few weeks. I wonder if the Acronis dummy backup would run multiple times at the next boot? If that was the case I could lose several weeks of backups straight up.
     
    Last edited: Feb 3, 2008
  8. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    I have now come up with a batch file, based on Jeremy Otten's ideas, that suits my circumstances. Because I have multiple backups, some with a 5 week cycle and some with a 13 week cycle I had to take a different approach in coding else my batch file would have been hard coded for 54 weekly files. It also would have been difficult to add more backups.

    I have two batch files. One, which does all the work, has almost no hardcoding of file names and the other which calls the first once for each backup and it provides file names and backup cycle lengths via local variables. I can now add a new backup into one batch file with a maximum of 5 lines of code and I dont have to touch the other batch file. Each batch file also creates a trace file into each backup folder which includes the time and date it was last run. It is fully tested and reliable.

    I will use a dummy Acronis backup run to issue a command to run these batch files once a week to age the backups. This has also been tested. All that remains is to set up the new Acronis backups and turn them on. I will run both old and new in parallel for a short while.

    My thanks to those people who replied to my question.
     
  9. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    Here is the main part of my solution. Although I call this batch file from another it is only a minor change to avoid this. This solution works on an XP sp2 system. I doubt that it would work, without recoding, on some earlier WIN versions.
    --------------------------------------------------------------------------
    @ECHO OFF

    REM Bob D 6 February 2008 based on ideas in a script by Jeremy Otten

    REM This program is intended to be CALLed by another batch program
    REM which has already set the following variables
    REM DRIVE .... drive where the backups are
    REM FOLDER .... partial path to the backup folder
    REM BACKUP .... backup folder
    REM TOTAL .... number of weeks in the backup series

    REM Make the backup folders if necessary
    set COUNT=1
    :LOOP1
    IF NOT EXIST %DRIVE%\%FOLDER%\%BACKUP%\WEEK%COUNT% MD %DRIVE%\%FOLDER%\%BACKUP%\WEEK%COUNT%
    set /a COUNT=%COUNT%+1
    if %TOTAL% GEQ %COUNT% GOTO LOOP1

    REM change to the backup folder
    CD /D %DRIVE%\%FOLDER%\%BACKUP%

    REM save date and time when script last run
    set FILENAME=%~f0
    echo Last run time of script %FILENAME% > timedate.txt
    echo for backup %DRIVE%\%FOLDER%\%BACKUP% >> timedate.txt
    time /t >> timedate.txt
    date /t >> timedate.txt

    REM stage 1 rename of weekly folders
    set COUNT=1

    :LOOP2
    RENAME WEEK%COUNT% WEEK%COUNT%A
    set /a COUNT=%COUNT%+1
    if %TOTAL% GEQ %COUNT% GOTO LOOP2

    REM stage 2 rename of weekly folders
    set COUNT=1
    set COUNT2=2

    :LOOP3
    RENAME WEEK%COUNT%A WEEK%COUNT2%
    set /a COUNT=%COUNT%+1
    set /a COUNT2=%COUNT2%+1
    if %TOTAL% GTR %COUNT% GOTO LOOP3

    REM rename the last back to the first
    RENAME WEEK%COUNT%A WEEK1

    REM delete the oldest backup files
    DEL /Q %DRIVE%\%FOLDER%\%BACKUP%\WEEK1\*.*

    :END

    and here is a sample of the batch file that calls the one above. See above for variable usage.

    --------------------------------------------------------------------------
    setlocal
    set DRIVE=e:
    set FOLDER=Acronis
    set SCRIPTFOLDER=%DRIVE%\%FOLDER%\Script

    REM save time and date when script last run
    set FILENAME=%~f0
    echo Last run time of script %FILENAME% > %SCRIPTFOLDER%\timedate.txt
    time /t >> %SCRIPTFOLDER%\timedate.txt
    date /t >> %SCRIPTFOLDER%\timedate.txt

    set BACKUP=DriveImages
    set TOTAL=5
    call %SCRIPTFOLDER%\script1.bat

    set BACKUP=Email
    set TOTAL=13
    call %SCRIPTFOLDER%\script1.bat
     
  10. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    Bob,

    Thanks for posting the script. Making it flexible and adding the trace file were both nice additions. I'm saving it for future reference/use.
     
  11. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    Just thought of how to do something I wanted but couldn't suss out before.
    To make the trace file a continuing record instead of the last run then just change the single > in the code to a double >> as in the code fragment below.

    REM save time and date when script last run
    set FILENAME=%~f0
    echo Last run time of script %FILENAME% > %SCRIPTFOLDER%\timedate.txt
    time /t >> %SCRIPTFOLDER%\timedate.txt
    date /t >> %SCRIPTFOLDER%\timedate.txt

    for a continuing trace record do it like this

    REM save time and date when script last run
    set FILENAME=%~f0
    REM the change is here ------------------|
    echo Last run time of script %FILENAME% >> %SCRIPTFOLDER%\timedate.txt
    time /t >> %SCRIPTFOLDER%\timedate.txt
    date /t >> %SCRIPTFOLDER%\timedate.txt
     
  12. hmmsjan

    hmmsjan Registered Member

    Joined:
    Jan 21, 2008
    Posts:
    9
    Hello,

    I'll going to try Jeremy Ottens script with Acronis 11.
    I'll schedule a task for Monday which calls the script and then a full backup,
    the other days an incremental without script.
    I only added a line to skip the whole moving of directories if there is
    no TIB file in the WEEK1 folder, otherwise the backups may vanish....:mad:
    Defined the WEEK1 as backup location without any limits, so I do not have
    to bother about filenames.

    Thanks and kind Regards,
     
  13. A J kadashevich

    A J kadashevich Registered Member

    Joined:
    Dec 9, 2007
    Posts:
    39
    I have the same problem.

    I have Acronis 11, build 8053. And I do use Managed Backup Locations which is supposed to take of this according to documentation.

    Is this a bug? Or did I set up incorrectly somehow?
     
  14. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    I think it's a bug. Why dont you report it and see if you get a solution. If you do then let us all know.
     
  15. BobD

    BobD Registered Member

    Joined:
    Nov 12, 2007
    Posts:
    9
    Location:
    Australia
    Referring back to my previous post #11 I talk about making an audit file and I showed some code. I have since discovered a more elegant way to do this in one line. It appears that Windows XP (and others?) has some undisplayed variables which can be used. See the quote below from the HELP text about the SET command.

    Here is a code sample to do the job which needed 4 lines previously. All of the variables used are defined by XP.

    Echo Last runtime of script %~f0 was at %TIME% on %DATE% > timedate.txt
    or a continuing record
    Echo Last runtime of script %~f0 was at %TIME% on %DATE% >> timedate.txt

    If Command Extensions are enabled, then there are several dynamic environment variables that can be expanded but which don't show up in the list of variables displayed by SET. These variable values are computed dynamically each time the value of the variable is expanded.

    %CD% - expands to the current directory string.
    %DATE% - expands to current date using same format as DATE command.
    %TIME% - expands to current time using same format as TIME command.
    %RANDOM% - expands to a random decimal number between 0 and 32767.
    %ERRORLEVEL% - expands to the current ERRORLEVEL value
    %CMDEXTVERSION% - expands to the current Command Processor Extensions version number.
    %CMDCMDLINE% - expands to the original command line that invoked the Command Processor.


    Note: Command Extensions are enabled by default in XP. See the HELP for the CMD command.
    Note: The variable %~f0 is referred to in XP Help by asking for using batch parameters
    Note: The $TIME% variable is accurate down to hundredths of seconds instead of just hours and minutes available with the TIME command.
     
Thread Status:
Not open for further replies.