Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A better Vault backup script to remove old backups

1 REPLY 1
Reply
Message 1 of 2
ThomasRambach
1825 Views, 1 Reply

A better Vault backup script to remove old backups

I just wanted to share the Vault backup script I've been using to backup the Vault daily. The script allows you to set the number of backups to save and it will delete the oldest beyond the number of backups you want saved.

 

{BackupFolder} : Set to your Vault backup location (3 locations in the script)

{Username} : Set to the Vault username

{Password} : Set to the Vault users password

skip=2 : This is set to save 3 backups. The 2 in the folder and the backup that will run with the script. Set this to at least 1.

 

 

@ECHO OFF

REM ---- Vault Daily Backup ----

    setlocal enableextensions disabledelayedexpansion

    pushd "{BackupFolder}" && (
        for /f "skip=2 delims=" %%a in (
            'dir /b /ad /tc /o-d'
        ) do rmdir /s /q "%%~fa"
        popd
    )

REM -- Backup Vault ---

"C:\Program Files\Autodesk\ADMS Professional 2019\ADMS Console\Connectivity.ADMSConsole.exe" -Obackup -B"{BackUpFolder}" -VU"{Username}" -VP"{Password}" -DBSC -S -L"{BackUpFolder}\Vault_Backup_Log.txt"
Tags (1)
1 REPLY 1
Message 2 of 2
RolfEven
in reply to: ThomasRambach

Thank you for sharing this.

Best regards,

/Rolf Even

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report