Skip to main content

Incremental settings

Beginner
Posts: 1
Comments: 9

Hello to all,

i'm new of this software and i need to set backup in this way: since i have a 1tb hdd for backup i need to set the auto delete function but i want incremental backup. I have set to make a full backup every 999 incremental version and to delete version 2days old but today acronis told me about disk full.

How can i set correctly the incremental backup to have only last 2 days incremental backup?

Thanks

Legend
Posts: 45
Comments: 14825

Mattia, welcome to these public User Forums.

What is the size of the data you are backing up and how often are you making a backup?  Both of these will influence the settings you will need to use.

Please note that in any incremental version chain, all incremental files are required for any recovery, you cannot set to create 999 incremental in a version chain then only keep 2 days worth of files!

Automatic cleanup only works on full version chains after a new Full backup file has been created successfully, so your scheme would create 1 Full then 999 Incremental files before a new Full is created, so your backup drive needs space to store all these 1001 files!

Beginner
Posts: 1
Comments: 9

Thanks for reply.

Full backup is about 600gb and hdd is 1tb.

How can make automatic cleanup? Now i have set the max backup size of 900gb, is enough? Which are settings i have to set up?

 

Thanks

Legend
Posts: 45
Comments: 14825

Mattia, sorry but if your full backup size is 600GB then you will need a bigger backup drive than your 1TB one as you need a minimum of 2 x 600GB for automatic cleanup to work without making any incremental backup files.

Beginner
Posts: 1
Comments: 9

And using incremental files will help in some way?

Legend
Posts: 45
Comments: 14825

Incremental files will normally be smaller in size as contain just the changes found since the previous backup was made, but the number of incrementals should be kept low as any recovery will need all the files to be successful.

The default backup setting is for a new Full backup to be created after creating 5 Incremental backup files, so that each backup version chain only will contain 6 files (1 Full + 5 Incr files).

If your Full backup is 600GB in size, if we assume each Incremental backup was 5 GB, then a version chain would be 600GB + 5 x 5GB = 625GB in size, so really you need to have a minimum 2TB size backup drive.

Beginner
Posts: 1
Comments: 9

Ok it's clear. But it's possible with a PRE script to verify the free space on the destination disk and if it is under 20gb, format the device and THEN start the backup?

Legend
Posts: 45
Comments: 14825

Mattia Di Giuseppe wrote:

Ok it's clear. But it's possible with a PRE script to verify the free space on the destination disk and if it is under 20gb, format the device and THEN start the backup?

Yes BUT...! To use a Pre Command script, you would also need to first stop Acronis Active Protection as this will try to prevent any action which will delete your existing backup .tib files, plus if you do this, then you will also get pop-up error messages for each deleted .tib file because information for these is held in an internal database.

Deleting your backup files via a script will leave you with no backup until your next backup action has completed, therefore your system will be at risk in that period unless you also make backups to a different location in addition to this 1TB drive.

The following script works for me when used during testing:

@echo off
sc stop "AcronisActiveProtectionService" > NUL 2>&1
del L:\Test\Downloads*.tib > NUL 2>&1
sc start "AcronisActiveProtectionService" > NUL 2>&1

You would need to adjust the delete command to your drive letter and file names.

 
Beginner
Posts: 1
Comments: 9

No problems about risk.

What i have to do in pre command configuration?

Is this script ok?

@echo off
if ((Get-WMIObject Win32_Logicaldisk -filter "deviceid='Z:'").FreeSpace -gt 10GB){
   echo "yes enough free space"
} else {
    sc stop "AcronisActiveProtectionService" > NUL 2>&1
    del Z:\backup*.tib > NUL 2>&1
    sc start "AcronisActiveProtectionService" > NUL 2>&1
}
Legend
Posts: 45
Comments: 14825

Mattia, the script looks fine

Beginner
Posts: 1
Comments: 9

Thanks but how can i set the pre command windows? i'm talking about the option in the windows. what i have to write or select?

Thanks

Legend
Posts: 45
Comments: 14825

Mattia, you would need to save the script as a .bat file then select that script.bat file in the Pre Command dialogue for your backup task.

An alternative approach would be to schedule the script to run using Windows Task Scheduler so that it runs before your Acronis backup task is due to run.

See forum topic: Backup drive to another same size drive: automatically delete backup - where this is described in more detail for using the Pre Command.

Beginner
Posts: 1
Comments: 9

Ok i have correctly set up the batch file but it's possibile to "auto ignore" popup after all backup files are deleted?

Legend
Posts: 45
Comments: 14825

Mattia, it has been some time since I last ran this type of script for a test task but would suggest that you run the task to test how it works for you, perhaps adjusting the free space value to simulate the drive being nearly full?

I normally turn off all the Advanced Options Error handling settings so that my tasks do not get themselves in a loop with sending out emails for a failed task.

Beginner
Posts: 1
Comments: 9

The batch file is perfect . Later I will post the final version. It's working perfectly but now the problem is when all files are deleted and acronis ask about this situation. I have to manually click on "ignore" button to make new chain. It's possible to avoid this pop-up? Thanks 

Legend
Posts: 45
Comments: 14825

Mattia, I have just setup a test Disk & Partitions backup of a small 1GB partition and used a similar script to delete old .tib files and am not getting any pop-up error messages when the task runs after the files are deleted.

I am using a powershell script rather than a batch command one but that should not make a difference here.

The backup task was setup originally as a 'Single version' scheme but then changed to be an Incremental scheme with 5 incremental files before a new full backup.

The powershell script is very simple:

Stop_AAP_delete_tibs.ps1

$taskfiles = "L:\Test\WINPE_*.tib"

if (test-path $taskfiles) {
write-host "$taskfiles found"
sc stop "AcronisActiveProtectionService"
remove-item $taskfiles
write-host "$taskfiles deleted"
sc start "AcronisActiveProtectionService"}

This is launched from the ATI task Pre-Command using a single line .CMD file:

Stop_AAP_delete_tibs.CMD

powershell.exe -ExecutionPolicy ByPass -File e:\Powershell\Stop_AAP_delete_tibs.ps1

If you are still seeing error messages for deleted files, then try starting with a new backup task to see if that makes a difference?

Legend
Posts: 45
Comments: 14825

Updated script files to allow creation of a single Incremental backup version chain then delete ready to start a new chain instead of using automatic cleanup.

Stop_AAP_delete_tibs.ps1

$testfiles = "L:\Test\WINPE_inc_b?_s6_*.tib"
$taskfiles = "L:\Test\WINPE_*.tib"

if (test-path $testfiles) {
write-host "$taskfiles found"
sc stop "AcronisActiveProtectionService"
remove-item $taskfiles
write-host "$taskfiles deleted"
sc start "AcronisActiveProtectionService"}

The variables $testfiles & $taskfiles can be adjusted for the location path and name of the backup files, and the number of incrementals to be created (s6 as shown).

Tested for my backup task and worked as expected.

Beginner
Posts: 1
Comments: 9

But i need to check the free space before

I have wrote this.

@Echo off
Rem        543210987654321
Set "Blank=               "
Set "GB100=   107374182400"
Set "TB_10= 10995116277760"
Set "GB5=   5368709120"
Set "GB700=   751619276800"
Set "GB10=   1073741824"

for /f "tokens=2" %%A in (
  'wmic LogicalDisk Get DeviceID^,FreeSpace ^| find /i "Z:"'
) Do Set "FreeSpace=%Blank%%%A"
Set "FreeSpace=%FreeSpace:~-15%"

Echo FreeSpace="%FreeSpace%"
Echo    5 GB="%GB5%"

If "%FreeSpace%" gtr "%GB5%" (
  Echo yes enough free space
) else (
    Echo not enough free space
    sc stop "AcronisActiveProtectionService" > NUL 2>&1
    del Z:\Dati*.tib > NUL 2>&1
    sc start "AcronisActiveProtectionService" > NUL 2>&1
)

 

How can i implement your version instead with check of empty space on drive Z?

Legend
Posts: 45
Comments: 14825

Mattia, if your script is working for you when you run it from a Windows command prompt, then you just need to add the script as a Pre Command to your ATI Backup task via the Advanced Options page.

My script was just checking whether I would be given any error messages caused by deleting the .tib files before my backup task ran, where there were no errors given.

Beginner
Posts: 1
Comments: 9

Ok i have done my version of the script and seems to be ok

Stop_AAP_delete_tibs.ps1

$taskfiles = "Z:\Dati_*.tib"

Set "Blank=               "
Set "GB100=   107374182400"
Set "TB_10= 10995116277760"
Set "GB5=   5368709120"
Set "GB700=   751619276800"
Set "GB10=   1073741824"

for /f "tokens=2" %%A in (
  'wmic LogicalDisk Get DeviceID^,FreeSpace ^| find /i "Z:"'
) Do Set "FreeSpace=%Blank%%%A"
Set "FreeSpace=%FreeSpace:~-15%"

if (test-path $taskfiles) {
    write-host "$taskfiles found"
    If "%FreeSpace%" gtr "%GB5%" (
      Echo yes enough free space
    ) else (
        sc stop "AcronisActiveProtectionService"
        remove-item $taskfiles
        write-host "$taskfiles deleted"
        sc start "AcronisActiveProtectionService"
    }
}