Maintain control of your Microsoft 365 data
Post Reply
ryan80
Lurker
Posts: 2
Liked: never
Joined: Oct 12, 2022 7:16 pm
Full Name: Ryan
Contact:

How can I get rid of version numbers when saving OneDrive?

Post by ryan80 »

Hi. When I save all OneDrive files for a user as files, VEEAM adds a version number to files that have versions in OneDrive. For example, a file named 'mydata.txt' might end up being 'mydata (ver 3.0).txt'. I'm saving all files for a user. The same thing happens if I save/export all files to a .zip.

Image

How do I get VEEAM to save files with the original file name instead of renaming everything to add the version?
Mike Resseler
Product Manager
Posts: 8045
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: How can I get rid of version numbers when saving OneDrive?

Post by Mike Resseler »

Hi Ryan,

The reason is that we have multiple versions of that file for that specific user. Like they exist on the OneDrive 4 Business. Today we don't have the specific functionality with this method to restore only the latest version. If you restore them to another onedrive location, then it will work as expected so as I workaround I suggest you restore them to a folder of another OneDrive user (yourself for example) and then copy them or zip them
ryan80
Lurker
Posts: 2
Liked: never
Joined: Oct 12, 2022 7:16 pm
Full Name: Ryan
Contact:

Re: How can I get rid of version numbers when saving OneDrive?

Post by ryan80 »

Hi Mike,

Thank you for the reply. Being able to restore the latest version with original file names would be useful for us. We deal mostly with small businesses and a fear that a lot of small business have is being (unfairly) banned by a big tech company, losing access to their data, and not having any recourse. Having the ability to restore an exact copy of the most recent version of their data without any cooperation from Microsoft is beneficial.

The current behavior is tolerable for us since we can bulk rename files if it ever gets to that point. However, having it as a restore option where we know it's 100% reliable would be nice to have, so, if possible, please consider adding it as an option at some point.

Thanks for the help!
robnicholsonmalt
Expert
Posts: 116
Liked: 12 times
Joined: Dec 21, 2018 11:42 am
Full Name: Rob Nicholson
Contact:

Re: How can I get rid of version numbers when saving OneDrive?

Post by robnicholsonmalt »

Another heads up for this requirement. I'm pretty sure that older versions didn't restore with the (ver) tag, e.g. "Freelancing Process Overview_Aug2021 FINAL (ver.2.0).pptx". That (ver 2.0) is new. It makes restoring to an alternative folder and then trying to do a merge with something like FreeFileSync or robocopy.exe much harder.
robnicholsonmalt
Expert
Posts: 116
Liked: 12 times
Joined: Dec 21, 2018 11:42 am
Full Name: Rob Nicholson
Contact:

Re: How can I get rid of version numbers when saving OneDrive?

Post by robnicholsonmalt » 1 person likes this post

I've knocked up this PowerShell script which will rename them. WARNING: use with caution/take backup first and also struggles with really long path lengths.

# Remove-VeeamVersion.ps1: removes the Veeam version tag from restored files.

Param([Parameter(Mandatory)][String]$Path)
If (!(Test-Path $Path)) {Write-Warning "Unable to find ""$Path"""; Exit}
ForEach ($File In Get-ChildItem $Path -Recurse -File) {
$Pattern = "(.*) \(ver\.\d+\.\d+\)(.*)"
If ($File.Name -Match $Pattern) {
$NewName = $File.Name -Replace $Pattern, '$1$2'
Write-Host $NewName
Rename-Item -LiteralPath $File.Fullname -NewName $NewName
}
}
Mike Resseler
Product Manager
Posts: 8045
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: How can I get rid of version numbers when saving OneDrive?

Post by Mike Resseler »

Thanks for doing this @robnicholson

If not yet done, don't forget to share it @ https://community.veeam.com/ ;-)
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests