Temporarily disable restoring to alternate resource for Groups (#4449)
<!-- PR description--> --- #### Does this PR need a docs update or release note? - [x] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [ ] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * #<issue> #### Test Plan <!-- How will this be tested prior to merging.--> - [ ] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
a49b15e13c
commit
f0e1000171
@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## Fixed
|
## Fixed
|
||||||
- Teams Channels that cannot support delta tokens (those without messages) fall back to non-delta enumeration and no longer fail a backup.
|
- Teams Channels that cannot support delta tokens (those without messages) fall back to non-delta enumeration and no longer fail a backup.
|
||||||
|
|
||||||
|
### Known issues
|
||||||
|
- Restoring the data into a different Group from the one it was backed up from is not currently supported
|
||||||
|
|
||||||
## [v0.13.0] (beta) - 2023-09-18
|
## [v0.13.0] (beta) - 2023-09-18
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@ -19,7 +19,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// AddRestoreConfigFlags adds the restore config flag set.
|
// AddRestoreConfigFlags adds the restore config flag set.
|
||||||
func AddRestoreConfigFlags(cmd *cobra.Command) {
|
func AddRestoreConfigFlags(cmd *cobra.Command, canRestoreToAlternate bool) {
|
||||||
fs := cmd.Flags()
|
fs := cmd.Flags()
|
||||||
fs.StringVar(
|
fs.StringVar(
|
||||||
&CollisionsFV, CollisionsFN, string(control.Skip),
|
&CollisionsFV, CollisionsFN, string(control.Skip),
|
||||||
@ -28,7 +28,10 @@ func AddRestoreConfigFlags(cmd *cobra.Command) {
|
|||||||
fs.StringVar(
|
fs.StringVar(
|
||||||
&DestinationFV, DestinationFN, "",
|
&DestinationFV, DestinationFN, "",
|
||||||
"Overrides the folder where items get restored; '/' places items into their original location")
|
"Overrides the folder where items get restored; '/' places items into their original location")
|
||||||
fs.StringVar(
|
|
||||||
&ToResourceFV, ToResourceFN, "",
|
if canRestoreToAlternate {
|
||||||
"Overrides the protected resource (mailbox, site, user, etc) where data gets restored")
|
fs.StringVar(
|
||||||
|
&ToResourceFV, ToResourceFN, "",
|
||||||
|
"Overrides the protected resource (mailbox, site, user, etc) where data gets restored")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ func addExchangeCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
|
|
||||||
flags.AddBackupIDFlag(c, true)
|
flags.AddBackupIDFlag(c, true)
|
||||||
flags.AddExchangeDetailsAndRestoreFlags(c)
|
flags.AddExchangeDetailsAndRestoreFlags(c)
|
||||||
flags.AddRestoreConfigFlags(c)
|
flags.AddRestoreConfigFlags(c, true)
|
||||||
flags.AddFailFastFlag(c)
|
flags.AddFailFastFlag(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ func addGroupsCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
flags.AddNoPermissionsFlag(c)
|
flags.AddNoPermissionsFlag(c)
|
||||||
flags.AddSharePointDetailsAndRestoreFlags(c) // for sp restores
|
flags.AddSharePointDetailsAndRestoreFlags(c) // for sp restores
|
||||||
flags.AddSiteIDFlag(c)
|
flags.AddSiteIDFlag(c)
|
||||||
flags.AddRestoreConfigFlags(c)
|
flags.AddRestoreConfigFlags(c, false)
|
||||||
flags.AddFailFastFlag(c)
|
flags.AddFailFastFlag(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ func (suite *GroupsUnitSuite) TestAddGroupsCommands() {
|
|||||||
"--" + flags.PageFolderFN, flagsTD.FlgInputs(flagsTD.PageFolderInput),
|
"--" + flags.PageFolderFN, flagsTD.FlgInputs(flagsTD.PageFolderInput),
|
||||||
"--" + flags.CollisionsFN, flagsTD.Collisions,
|
"--" + flags.CollisionsFN, flagsTD.Collisions,
|
||||||
"--" + flags.DestinationFN, flagsTD.Destination,
|
"--" + flags.DestinationFN, flagsTD.Destination,
|
||||||
"--" + flags.ToResourceFN, flagsTD.ToResource,
|
// "--" + flags.ToResourceFN, flagsTD.ToResource,
|
||||||
"--" + flags.NoPermissionsFN,
|
"--" + flags.NoPermissionsFN,
|
||||||
},
|
},
|
||||||
flagsTD.PreparedProviderFlags(),
|
flagsTD.PreparedProviderFlags(),
|
||||||
@ -91,7 +91,7 @@ func (suite *GroupsUnitSuite) TestAddGroupsCommands() {
|
|||||||
assert.Equal(t, flagsTD.FileModifiedBeforeInput, opts.FileModifiedBefore)
|
assert.Equal(t, flagsTD.FileModifiedBeforeInput, opts.FileModifiedBefore)
|
||||||
assert.Equal(t, flagsTD.Collisions, opts.RestoreCfg.Collisions)
|
assert.Equal(t, flagsTD.Collisions, opts.RestoreCfg.Collisions)
|
||||||
assert.Equal(t, flagsTD.Destination, opts.RestoreCfg.Destination)
|
assert.Equal(t, flagsTD.Destination, opts.RestoreCfg.Destination)
|
||||||
assert.Equal(t, flagsTD.ToResource, opts.RestoreCfg.ProtectedResource)
|
// assert.Equal(t, flagsTD.ToResource, opts.RestoreCfg.ProtectedResource)
|
||||||
assert.True(t, flags.NoPermissionsFV)
|
assert.True(t, flags.NoPermissionsFV)
|
||||||
flagsTD.AssertProviderFlags(t, cmd)
|
flagsTD.AssertProviderFlags(t, cmd)
|
||||||
flagsTD.AssertStorageFlags(t, cmd)
|
flagsTD.AssertStorageFlags(t, cmd)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ func addOneDriveCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
flags.AddBackupIDFlag(c, true)
|
flags.AddBackupIDFlag(c, true)
|
||||||
flags.AddOneDriveDetailsAndRestoreFlags(c)
|
flags.AddOneDriveDetailsAndRestoreFlags(c)
|
||||||
flags.AddNoPermissionsFlag(c)
|
flags.AddNoPermissionsFlag(c)
|
||||||
flags.AddRestoreConfigFlags(c)
|
flags.AddRestoreConfigFlags(c, true)
|
||||||
flags.AddFailFastFlag(c)
|
flags.AddFailFastFlag(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ func addSharePointCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
flags.AddBackupIDFlag(c, true)
|
flags.AddBackupIDFlag(c, true)
|
||||||
flags.AddSharePointDetailsAndRestoreFlags(c)
|
flags.AddSharePointDetailsAndRestoreFlags(c)
|
||||||
flags.AddNoPermissionsFlag(c)
|
flags.AddNoPermissionsFlag(c)
|
||||||
flags.AddRestoreConfigFlags(c)
|
flags.AddRestoreConfigFlags(c, true)
|
||||||
flags.AddFailFastFlag(c)
|
flags.AddFailFastFlag(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -226,18 +226,18 @@ func (suite *GroupsRestoreNightlyIntgSuite) TestRestore_Run_groupsWithAdvancedOp
|
|||||||
suite.its.group.RootSite.DriveRootFolderID)
|
suite.its.group.RootSite.DriveRootFolderID)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *GroupsRestoreNightlyIntgSuite) TestRestore_Run_groupsAlternateProtectedResource() {
|
// func (suite *GroupsRestoreNightlyIntgSuite) TestRestore_Run_groupsAlternateProtectedResource() {
|
||||||
sel := selectors.NewGroupsBackup([]string{suite.its.group.ID})
|
// sel := selectors.NewGroupsBackup([]string{suite.its.group.ID})
|
||||||
sel.Include(selTD.GroupsBackupLibraryFolderScope(sel))
|
// sel.Include(selTD.GroupsBackupLibraryFolderScope(sel))
|
||||||
sel.Filter(sel.Library("documents"))
|
// sel.Filter(sel.Library("documents"))
|
||||||
sel.DiscreteOwner = suite.its.group.ID
|
// sel.DiscreteOwner = suite.its.group.ID
|
||||||
|
|
||||||
runDriveRestoreToAlternateProtectedResource(
|
// runDriveRestoreToAlternateProtectedResource(
|
||||||
suite.T(),
|
// suite.T(),
|
||||||
suite,
|
// suite,
|
||||||
suite.its.ac,
|
// suite.its.ac,
|
||||||
sel.Selector,
|
// sel.Selector,
|
||||||
suite.its.group.RootSite,
|
// suite.its.group.RootSite,
|
||||||
suite.its.secondaryGroup.RootSite,
|
// suite.its.secondaryGroup.RootSite,
|
||||||
suite.its.secondaryGroup.ID)
|
// suite.its.secondaryGroup.ID)
|
||||||
}
|
// }
|
||||||
|
|||||||
@ -33,3 +33,5 @@ Below is a list of known Corso issues and limitations:
|
|||||||
* Teams messages don't support Restore due to limited Graph API support for message creation.
|
* Teams messages don't support Restore due to limited Graph API support for message creation.
|
||||||
|
|
||||||
* Groups and Teams support is available in an early-access status, and may be subject to breaking changes.
|
* Groups and Teams support is available in an early-access status, and may be subject to breaking changes.
|
||||||
|
|
||||||
|
* Restoring the data into a different Group from the one it was backed up from isn't currently supported
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user