Skip to main content

Incremental settings

Thread needs solution
Forum Member
Posts: 1
Comments: 31

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

0 Users found this helpful
Legend
Posts: 79
Comments: 16717

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!

Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

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.

Forum Member
Posts: 1
Comments: 31

And using incremental files will help in some way?

Legend
Posts: 79
Comments: 16717

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.

Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

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.

 
Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

Mattia, the script looks fine

Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

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.

Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

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.

Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

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: 79
Comments: 16717

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.

Forum Member
Posts: 1
Comments: 31

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: 79
Comments: 16717

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.

Forum Member
Posts: 1
Comments: 31

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"
    }
}

 

Forum Member
Posts: 1
Comments: 31

I have a problem.

SCENARIO: only create incremental backup, My pre backup script is

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

[WMI]$part = "Win32_LogicalDisk.DeviceID='Z:'"
$free = $part.FreeSpace
$minSpace= 375809638400

if ($free -lt $minSpace)
{
        echo "poco spazio cancellare"
        #Format-Volume -DriveLetter "Z" -FileSystem NTFS -NewFileSystemLabel "Backup"
        $taskfiles = "Z:\Dati_*.tib"

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

}
else
{
echo "fai backup"
}

And it works as expected but i have a problem with acronis: when the script delete all files acronis don't find the last backup (it's ok) and give me an error so automatic backup function stop at this step. How can i fix it? 

Thanks

Legend
Posts: 79
Comments: 16717

Mattia, you have an extra line in your script that could impact on how ATI looks at your backup drive:

 #Format-Volume -DriveLetter "Z" -FileSystem NTFS -NewFileSystemLabel "Backup"

The previous script did not reformat the backup drive and should not have given an issue after deleting the files.  When you reformat the drive, then you can be assigning a new UUID for the drive which then no longer matches the UUID known by Acronis.

I understand that the extra line is commented out by using # but if you have performed this action it can make changes that can cause Acronis to falter.

 

Forum Member
Posts: 1
Comments: 31

OK i have cancelled the line and now i have start a new backup from beginnig. After i'll change the condition of min size for test and i'll report what happens.

Thanks.

Forum Member
Posts: 1
Comments: 31

well the problem persist. When the flie is deleted, backup give me an error (acronis doesn't find backup file) and i have manullay to click on ignore button. 

Any advice?

Legend
Posts: 79
Comments: 16717

Mattia, what do you have set for your task Advanced Options Error Handling settings?

I have all error settings disabled for my test script.

Legend
Posts: 79
Comments: 16717

Mattia, just ran my own test script again and was also getting error messages that required user intervention but only when the script was deleting files for the first backup chain, i.e. _b1_ files.

Once my backup task had started a second chain _b2_ then the script has been running without the error messages and keeps recreating the same chain again after being deleted!

Forum Member
Posts: 1
Comments: 31

So i can't have the option to create only one full backup and then all incremental? 

I don't understand how I have to set the backup settings. Now my aim is to delete all files and start from scratch. It's possible without error? 

Forum Member
Posts: 1
Comments: 31

Also I have noticed that my script makes my ram full and I have to reset pc! But not always .. Seems only when it is launched from acronis before backup.

Legend
Posts: 79
Comments: 16717

Mattia, I have been testing this further and have this working with a single Full backup and Incrementals only afterwards but launching the backup task using Powershell and the Windows Task Scheduler, not using a Pre Command in ATI for the task.

The Powershell script is longer so have put a copy in a zip file for you to look at. 
The script checks if the number of Incremental files has been reached, then clears all the files and starts with a new Full backup again. It also check if the free space on the backup drive is less than 10GB and clears all the files if so.

You can test the script from a Powershell windows (run as Administrator) but this will launch the main ATI GUI then close it again, whereas the GUI is not shown when launched via the Windows Task Scheduler.

Example of the script running from Powershell:

PS E:\powershell> .\Launch_ATI_Task_after_Clean.ps1
25/02/2019 11:01:13.71 Backup launcher script started:
25/02/2019 11:01:13.80 Free space is greater than 10GB
25/02/2019 11:01:13.84 Checking for .tib files to be deleted
25/02/2019 11:01:13.87 Check status of TrueImage.exe
25/02/2019 11:01:13.89 TrueImage.exe was not active
25/02/2019 11:01:13.91 Launching hidden ATI background task
25/02/2019 11:01:24.08 Ready to launch ATI backup task
25/02/2019 11:01:24.09 Start ATI Task Script 30089F46-F0D4-4696-903E-41162235E361 Name Backup WINPE to Drive L
25/02/2019 11:01:54.24 End ATI Task Script 30089F46-F0D4-4696-903E-41162235E361 Name Backup WINPE to Drive L
25/02/2019 11:01:54.28 Ready to cleanup after task has completed
25/02/2019 11:01:54.33 Check status of TrueImage.exe
25/02/2019 11:01:54.54 TrueImage.exe was terminated
25/02/2019 11:01:59.67 Backup launcher script finished:
PS E:\powershell>

The script also creates a text backuplog file in the user %temp% folder showing the actions being performed.

Attachment Size
490358-164577.zip 1.7 KB
Forum Member
Posts: 1
Comments: 31

So i have to disable automatic backup function in ATI and delete the PRE command?

Legend
Posts: 79
Comments: 16717

For the script in the zip file, yes.

Forum Member
Posts: 1
Comments: 31

Yes for use the script in the zip.

I have set a windows scheduled task and disabled scheduled taks on ATI. It's correct?

Legend
Posts: 79
Comments: 16717

Yes, correct Mattia.

Forum Member
Posts: 1
Comments: 31

It's starts but it's possibile to open app and follow the progress? I can't open ATI in any way....

Also, i have noticed that the script delete only full version and NOT all files, why? I want to delete all files. It's possible?

Legend
Posts: 79
Comments: 16717

Mattia, the ATI task is running hidden in the background, so if you want to open it on the desktop, you will need to launch the Windows Task Manager, then end the TrueImage.exe process before trying to launch the ATI GUI.

Ending TrueImage.exe will not stop the background backup task which is using TrueImageHomeService.exe.

The alternative process is to type %temp% to open the temp folder and open BackupLog.txt in Notepad for the log created by the script.

The script will delete the files that you tell it to delete, so you need to check what you have for the 2 script variables:

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

The above deleted all the .tib files with names starting WINPE_  for me after testing that a full chain of 6 files had been created.

Forum Member
Posts: 1
Comments: 31

Ok the file is deleted but during the deletion and after the ram usage go up to 99% and I have to reboot my pc . This situation is only when the script must delete something. The file is deleted but I have to reboot pc . Why? 

Forum Member
Posts: 1
Comments: 31

Also when file is deleted, acronis don't find it and give me an error. I attach the script i'm using.

I call the CMD file from windows scheduled task app.

What i want to achieve is:

  1. make first full backup
  2. Then only incremental
  3. When left space is under $value delete ALL and start new backup.

It's possibile?

Thanks for support

Attachment Size
490564-164654.zip 1.99 KB
Legend
Posts: 79
Comments: 16717

Mattia, I can see no reason why your RAM usage should go to 99% when deleting files unless you have other software involved which is checking such file deletions, i.e. security software?  If so, then you should whitelist the main Acronis executables in that software.

The creation of a full followed only by incremental backup files is controlled purely within the ATI backup task options and not changed by using a script to launch the task.

If you want the script to work only based on available free space, then just put a comment marker at the beginning of line calling the ClearFiles function, i.e. so it look like below:

PrepareLog                            # Clean current log after renaming old log
TimeStamp "Backup launcher script started:"
CheckSpace
# ClearFiles
KillTI
Forum Member
Posts: 1
Comments: 31

Sorry Steve, I did not understand the last part (about free space).

About security application, i only have kaspersky

But what about the ATI error about it didn't find the backupped files after delete of script? How can i fix this?

Legend
Posts: 79
Comments: 16717

Mattia, the ClearFiles function part of the script isn't really needed if all you want to do is to delete your backup files when the drive is running down on space, hence you can comment out (aka turn off) that portion of the script.

I have been running tests of the script and have not been getting any ATI errors after my backup files have been deleted, so not sure why that is happening for you.

The only guaranteed method of making this whole process as simple and reliable as possible is to use a backup drive that is large enough to allow the use of the Automatic Cleanup rules in your backup task settings.  Using Automatic Cleanup means that ATI manages all your files for you and does all the deleting and the house-keeping around those actions, such as updating the internal database information to reflect all changes.

Legend
Posts: 79
Comments: 16717

Mattia, to stop any ATI error messages caused by deleting the .tib files via the script, you need to have the following Error Handling setting enabled:

Forum Member
Posts: 1
Comments: 31

As you can see from pic, after i launch the script and it detected that space in not enough....

  1. Ram became full (kaspersky deactivated)
  2. FIle is correctly deleted
  3. Error about file not found in acronis

I have launched the script posted before in a cmd session.

Any advice?

Attachment Size
490680-164718.png 630.63 KB
Forum Member
Posts: 1
Comments: 31

Update: now all is ok but the problem of ram usage during deletion of file remains. The deletion is not quick and during the process of deletion ram usage go tup to 99%

As you can see from the log

27/02/2019 13:32:31.88 Drive space is less than 980GB
27/02/2019 13:33:59.28 Check status of TrueImage.exe

between these two action there is over 1 min and in this time ram usage increase up to 99%.

Any ideas about?

Thanks

Legend
Posts: 79
Comments: 16717

Mattia, the only action being performed between the two messages in the log is the deletion of the backup files.

I am not seeing the ram usage issue for my own test drive but the amount of data / files involved is very small (just around 2GB for my testing), so this may be a factor if you are working with much more data?

Have you tested what the ram usage is if you delete the same volume of data on the same drive directly from Explorer?

Forum Hero
Posts: 63
Comments: 7709

So, it shows memory usage maxed out in that screenshot, but you should also go to the details tab and see what is using the majority of the ram at that time. Something in particular is likely using the bulk of that memory and will hopefully stand out.

I've not used Kaspersky, mostly because of reports about high CPU and memory utilization (same with Symantec products too). I was just Googling it and forums mention using  a ram cache can be a culprit for extremely high memory usage. 

Two other settings to try disabling per

https://support.kaspersky.com/12993

Are the application and rootkit scanning. 

Forum Member
Posts: 1
Comments: 31

It's not kasperky. With kasp disabled the situation is the same. I can't see what is eating ram since if i sort the Memory column descending the ram used from process and services is ok. 

I have made some test and i have noticed that when the function 

function CheckSpace {
if ((Get-WMIObject Win32_Logicaldisk -filter $filter).FreeSpace -gt $testspace){
TimeStamp "Free space is greater than $testspace"
} else {
TimeStamp "Drive space is less than $testspace"
write-host "Drive space is less than $testspace"
sc stop "AcronisActiveProtectionService" 
remove-item $taskfiles  
sc start "AcronisActiveProtectionService" }
}

is called and there are some files to delete, the ram being used! the only think to try is to comment line about service stop and start since i haven't protection of acronis active

Forum Member
Posts: 1
Comments: 31

Ok I have found the problem. 

The problem is the size of file to delete. If the file si very big for some reason memory usage during deletion raise up! It's necessary to investigate this strange behavior 

Legend
Posts: 79
Comments: 16717

Mattia, one option here may be to use one of the Advanced Backup Splitting options to reduce the size of the backup files being created into smaller segments.  The total size of all the segments will still be the same but you would only be deleting smaller files when clearing the drive.

 

Forum Member
Posts: 1
Comments: 31

Good advice Steve. I'll try asap and report!

Forum Member
Posts: 1
Comments: 31

Even with backup splitting settings it's the same.

I have added a command to remove variables at the end of the script and so when the script is completed ram usage returns normal so it's variable depending. Seems that powrshell caches files before deletion or something similar.

Legend
Posts: 79
Comments: 16717

Mattia, that is interesting about the variables, what command are you using to release their storage?  I am not seeing any issues for my own scripts and ram usage, and I would expect all ram usage to be released when the script exits.