Is there file retention with Windows Server backup 2022?

Anonymous
2024-09-17T17:19:02+00:00

I'm running daily backups with Windows Server backup 2022, but unfortunately they're saving over themselves.

I've checked the configuration, and unfortunately I can't find anything that allows me to keep a 14-day retention.

Is it possible to have retention with the Windows Server Backup tool?

Or am I the one who didn't understand how to do it?

Thank you

Steeve

Windows Server | High availability

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-09-18T01:44:43+00:00

    Unfortunately, Windows Server Backup does not have a built-in feature to manage retention policies directly. This means that it will overwrite previous backups if the storage space is limited or if the backup schedule is set to overwrite existing backups.

    However, you can manage retention by using a combination of scripts and scheduled tasks. Here are some steps you can follow to set up a 14-day retention policy:

    1. Create a Backup Script: Write a PowerShell script to perform the backup and save it with a timestamp in the filename. This will prevent the backups from overwriting each other.
    2. Create a Cleanup Script: Write another PowerShell script to delete backups older than 14 days. This script will scan the backup directory and remove files that exceed the retention period.
    3. Schedule the Scripts: Use Task Scheduler to run the backup script daily and the cleanup script periodically (e.g., once a week).
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-10-15T13:00:16+00:00

    Thanks @Ian_Xue

    It's works great now

    0 comments No comments