Skip to content

Sandbox clone functionality #928

@Peter4137

Description

@Peter4137

Is your feature request related to a problem? Please describe.
It would be extremely useful to have the capability to duplicate/copy and sandbox into a new instance, for cases when we'd like to fork an instance and continue in two separate sandboxes.

Describe the solution you'd like
A simple .copy() method on a sandbox would be ideal:

sandbox: Sandbox = client.connect(existing_sandbox_id)
new_sandbox_id = sandbox.copy()

Describe alternatives you've considered
The current workaround is to create a new sandbox, and then iterate over all filepaths to copy files from the existing sandbox to the new one. This involves potentially hundreds of network requests and therefore adds considerable delay to what could be quite a fast process.

If this is too specific a feature request, a means of bulk-reading files, to then be able to use the bulk upload method would also work, as it would remove the necessity to read each file separately. For example

sandbox: Sandbox = client.connect(existing_sandbox_id)
files = sandbox.files.read([
 {"path": "some/path", <kwargs>},
 {"path": "some/other/path", <kwargs>},
])
sandbox.files.write_files([...])

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions