GC: Restore: Libraries Workflow (#2511)
## Description Due to recent changes with `Incrementals` restore of Library categories stopped working. This PR will allow for files that do not require special folder permissions to be restored. Changes involve the folder naming format that was coming from the CLI <!-- Insert PR description--> ## Does this PR need a docs update or release note? - [x] ⛔ No ## Type of change - [x] 🐛 Bugfix ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * closes #2489<issue> ## Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual
This commit is contained in:
parent
28fcafe3b2
commit
e70bf25f6e
@ -170,7 +170,7 @@ func restoreSharePointCmd(cmd *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
defer utils.CloseRepo(ctx, r)
|
defer utils.CloseRepo(ctx, r)
|
||||||
|
|
||||||
dest := control.DefaultRestoreDestination(common.SimpleDateTime)
|
dest := control.DefaultRestoreDestination(common.SimpleDateTimeOneDrive)
|
||||||
|
|
||||||
sel := utils.IncludeSharePointRestoreDataSelectors(opts)
|
sel := utils.IncludeSharePointRestoreDataSelectors(opts)
|
||||||
utils.FilterSharePointRestoreInfoSelectors(sel, opts)
|
utils.FilterSharePointRestoreInfoSelectors(sel, opts)
|
||||||
|
|||||||
25
src/internal/connector/onedrive/drivesource_string.go
Normal file
25
src/internal/connector/onedrive/drivesource_string.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Code generated by "stringer -type=driveSource"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package onedrive
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[unknownDriveSource-0]
|
||||||
|
_ = x[OneDriveSource-1]
|
||||||
|
_ = x[SharePointSource-2]
|
||||||
|
}
|
||||||
|
|
||||||
|
const _driveSource_name = "unknownDriveSourceOneDriveSourceSharePointSource"
|
||||||
|
|
||||||
|
var _driveSource_index = [...]uint8{0, 18, 32, 48}
|
||||||
|
|
||||||
|
func (i driveSource) String() string {
|
||||||
|
if i < 0 || i >= driveSource(len(_driveSource_index)-1) {
|
||||||
|
return "driveSource(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
|
}
|
||||||
|
return _driveSource_name[_driveSource_index[i]:_driveSource_index[i+1]]
|
||||||
|
}
|
||||||
@ -234,7 +234,8 @@ func RestoreCollection(
|
|||||||
restoreFolderElements,
|
restoreFolderElements,
|
||||||
parentPerms,
|
parentPerms,
|
||||||
colPerms,
|
colPerms,
|
||||||
permissionIDMappings)
|
permissionIDMappings,
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errUpdater(directory.String(), errors.Wrapf(err, "failed to create folders %v", restoreFolderElements))
|
errUpdater(directory.String(), errors.Wrapf(err, "failed to create folders %v", restoreFolderElements))
|
||||||
return metrics, folderPerms, permissionIDMappings, false
|
return metrics, folderPerms, permissionIDMappings, false
|
||||||
|
|||||||
@ -70,7 +70,7 @@ func RestoreCollections(
|
|||||||
service,
|
service,
|
||||||
dc,
|
dc,
|
||||||
map[string][]onedrive.UserPermission{}, // Currently permission data is not stored for sharepoint
|
map[string][]onedrive.UserPermission{}, // Currently permission data is not stored for sharepoint
|
||||||
onedrive.OneDriveSource,
|
onedrive.SharePointSource,
|
||||||
dest.ContainerName,
|
dest.ContainerName,
|
||||||
deets,
|
deets,
|
||||||
errUpdater,
|
errUpdater,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user