Veeam Endpoint Standalone Backup via task scheduler

Backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)

Veeam Endpoint Standalone Backup via task scheduler

Veeam Logoby rmeinen » Wed Nov 09, 2016 7:53 pm

I am running the Veeam Endpoint backup on several workstations weekly using the task scheduler and the standalone option. This allows me to run full backup weekly. right now I am manually removing the older backups from the application. I am wondering if there is a way to automatically have them deleted. I realize that once the full weekly option is added to the scheduler I will be able to manage it that way but in the mean time I am looking for a solution now. Thanks.
rmeinen
Novice
 
Posts: 6
Liked: 1 time
Joined: Thu Jul 07, 2016 6:01 pm
Full Name: Randy Meinen

Re: Veeam Endpoint Standalone Backup via task scheduler

Veeam Logoby Dima P. » Thu Nov 10, 2016 12:31 pm

Hi Randy,

There is no way to automate the standalone full backup removal via UI. I wonder why you are not using the forever incremental backup approach with built-in retention logic.
Dima P.
Veeam Software
 
Posts: 6111
Liked: 434 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Veeam Endpoint Standalone Backup via task scheduler

Veeam Logoby rmeinen » Thu Nov 10, 2016 8:20 pm

I backup up 40 workstations. That is roughly 2.8tb. I am concerned the forever incremental will increase my space allocation way too much over time.
rmeinen
Novice
 
Posts: 6
Liked: 1 time
Joined: Thu Jul 07, 2016 6:01 pm
Full Name: Randy Meinen

Re: Veeam Endpoint Standalone Backup via task scheduler

Veeam Logoby Mike Resseler » Thu Nov 10, 2016 9:22 pm

Actually, using this method won't use that much space. If your retention is set to 14 days, and let's say you backup once a day, then you will have 1 full and 13 smaller incrementals (changes only...) When the next backup is taken, the oldest incremental gets merged with the full.

If you would take full in between, you will have more space needed because the full ones are normally much bigger.

Hope it helps
Mike
Mike Resseler
Veeam Software
 
Posts: 3130
Liked: 360 times
Joined: Fri Feb 08, 2013 3:08 pm
Location: Belgium, the land of the fries, the beer, the chocolate and the diamonds...
Full Name: Mike Resseler

Re: Veeam Endpoint Standalone Backup via task scheduler

Veeam Logoby AlexLeadingEdge » Thu Nov 10, 2016 10:22 pm 2 people like this post

Hi rmeinen, great question! We had the same question a while back. Here are two ways we solved it, both use batch files to delete old standalone backups, both triggered using task scheduler.

You can use FORFILES to delete files older than a certain time period from a certain location, in this case from the Z Drive after 8 days:

Code: Select all
forfiles.exe /S -p  z:\ -m *.* -d -8 -c "Cmd.exe /C del @path"


Alternatively you can delete old files AND folders using a batch file once the hard drive gets to a certain percentage full; this was working but a Windows 10 update has broken this for some reason; I've been meaning to fix it but don't have the time, it is the last few lines that no longer work, perhaps a coder here can point out why it isn't working? I suspect it now pulls in hidden system and recycle bin folders and it fails because of permission issues. Note that this deletes files from an I Drive, not the Z Drive as above:

Code: Select all
@ECHO OFF
:: Set minimum free space in bytes
SET minfreespace=500,000,000,000

:: Calculate used space in bytes
FOR /F "delims=" %%i IN ('dir I:\') DO SET space=%%i
SET process_01=%space%
SET process_02=%process_01:~-26%
SET process_03=%process_02:.=%
SET freespace=%process_03: bytes free=%

:: Clear the screen
:: CLS

:: Display free space
ECHO Free space: %freespace%

:: Display limit previously defined
ECHO Minimum Free Space: %minfreespace%

:: If free space is less than the minimum space required run delete oldest
:: file program
IF "%freespace%" LEQ "%minfreespace%" GOTO command

:: Run delete oldest file program if free space low
:command

:: Select starting folder location
I:

:: Recursively creates list of all files / folders from oldest to newest
DIR /AD-S-H-R /OD /B > fileslist.txt

:: Pulls in first line of fileslist.txt (i.e. oldest file) and deletes that file / folder
SET /p firstline =< fileslist.txt
RMDIR "%firstline%" /Q
DEL fileslist.txt
AlexLeadingEdge
Expert
 
Posts: 120
Liked: 13 times
Joined: Mon Dec 14, 2015 9:42 pm


Return to Veeam Agent for Windows



Who is online

Users browsing this forum: No registered users and 11 guests