ashmrtn f61448d650
Groups version bump (#4561)
Bump the backup version and force a full backup if
there's a backup for teams/groups that has base(s)
from an older version of corso

This will avoid propagating older details formats
forward. Those formats don't have all the data
newer formats do

This is mostly a stop-gap, a more robust solution
can be added later

Manually tested that it forces a full backup

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

* #4569

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-10-27 19:37:39 +00:00

59 lines
2.1 KiB
Go

package version
const Backup = Groups9Update
// Various labels to refer to important version changes.
// Labels don't need 1:1 service:version representation. Add a new
// label when it's important to mark a delta in behavior that's handled
// somewhere in the logic.
// Labels should state their application, the backup version number,
// and the colloquial purpose of the label.
const (
// NoBackup should be used when we cannot find, or do not supply, prior backup metadata.
NoBackup = -1
// OneDrive1DataAndMetaFiles is the corso backup format version
// in which we split from storing just the data to storing both
// the data and metadata in two files.
OneDrive1DataAndMetaFiles = 1
// Version 2 switched Exchange calendars from using folder display names to
// folder IDs in their RepoRef.
// OneDrive3IsMetaMarker is a small improvement on
// VersionWithDataAndMetaFiles, but has a marker IsMeta which
// specifies if the file is a meta file or a data file.
OneDrive3IsMetaMarker = 3
// OneDrive4IncludesPermissions includes permissions for folders in the same
// collection as the folder itself.
OneDrive4DirIncludesPermissions = 4
// OneDrive5DirMetaNoName changed the directory metadata file name from
// <dirname>.dirmeta to just .dirmeta to avoid issues with folder renames
// during incremental backups.
OneDrive5DirMetaNoName = 5
// OneDrive6NameInMeta points to the backup format version where we begin
// storing files in kopia with their item ID instead of their OneDrive file
// name.
OneDrive6NameInMeta = 6
// OneDriveXLocationRef provides LocationRef information for Exchange,
// OneDrive, and SharePoint libraries.
OneDrive7LocationRef = 7
// All8MigrateUserPNToID marks when we migrated repo refs from the user's
// PrincipalName to their ID for stability.
All8MigrateUserPNToID = 8
// Groups9Update marks when we updated the details that groups and teams use.
// Older backups don't contain all the info we want in details.
Groups9Update = 9
)
// IsNoBackup returns true if the version implies that no prior backup exists.
func IsNoBackup(version int) bool {
return version <= NoBackup
}