Daily Complete backups kept for one week


Author
Message
Macriummer
Macriummer
New Member
New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)
Group: Forum Members
Posts: 18, Visits: 33
My goal is to have a new full back-up made every day. After one week I want the cycle to repeat. I've got the initial naming figured out. After seven days I have the following files:

D:\Images Auto\Auto-1-Monday-00-00.mrimg
D:\Images Auto\Auto-2-Tuesday-00-00.mrimg
D:\Images Auto\Auto-3-Wednesday-00-00.mrimg
D:\Images Auto\Auto-4-Thursday-00-00.mrimg
D:\Images Auto\Auto-5-Friday-00-00.mrimg
D:\Images Auto\Auto-6-Saturday-00-00.mrimg
D:\Images Auto\Auto-7-Sunday-00-00.mrimg

What I want to have happen is that on the next Monday I end up with a file having the same name but what I'm getting is:

D:\Images Auto\Auto-1-Monday1-00-00.mrimg

For retention rules I've tried using Full keep 7 days, Full Keep 1 weeks and Full Keep 7 Backups. I've tried checking "Run purge before backup" but every time after the first week Macrium starts adding 1 to the file name. How can I get my desired result of seven files named by day number and day name with no extra numbers? If possible I'd like to get rid of the "-00-00" for each name as well. I'm willing to use scripting and/or robocopy if necessary. Thanks for any help anyone can give.




jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)Macrium Evangelist (22K reputation)
Group: Forum Members
Posts: 14K, Visits: 84K
The 1 at the end of the “core” name (before the automatic numbering at the end) is Reflect’s naming collision avoidance mechanism for cases where the pattern-based name already exists at the destination. I would have expected that running the purge before the backup would solve this. But maybe Reflect’s code evaluates the existing backups to determine the new file’s name before executing the purge. I can’t think of a way to script around this that would be both clean and reliable. A clean way would be to write something that said, “Take the current day of the week and delete any backups that have that day in their name.” I wouldn’t feel comfortable using something like that — maybe adding a constraint of deleting only the oldest matching backup? — but that would be pretty easy to write in PowerShell if you feel you’d be comfortable with it.

In terms of getting rid of the 00-00, that would require renaming the file after the fact. That would be pretty easy to script.

However, both of the script behaviors described above — deleting backups and renaming them — would be blocked by Image Guardian. So you’d have to decide whether disabling that protection would be worth the naming outcomes you want. If so, I could help with this after the holiday.
Edited 26 November 2023 10:30 PM by jphughan
Macriummer
Macriummer
New Member
New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)New Member (23 reputation)
Group: Forum Members
Posts: 18, Visits: 33

Thanks for the reply. I don't want to disable Image Guardian. I've now changed the number of days to keep a back-up to 6. I'll see if that makes a difference. I hope you had a good holiday.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search