Skip to content

Comments

Add new methods to manage instance server (reinstall, backup create, info, download, delete )#279

Open
aliel wants to merge 4 commits intomainfrom
aliel-add-instance-backup-restore-operations
Open

Add new methods to manage instance server (reinstall, backup create, info, download, delete )#279
aliel wants to merge 4 commits intomainfrom
aliel-add-instance-backup-restore-operations

Conversation

@aliel
Copy link
Member

@aliel aliel commented Feb 21, 2026

This PR add new methods to perform new actions on an instance

  • reinstall_instance to reinstall an existing instance to its initial state
  • create_backup to create a backup of an instance and return a pre-signed download link
  • get_backup to get backup info if it exists and return a pre-signed download link
  • restore_from_file to restore an instance from a provided rootfs file
  • restore_from_volume to restore an instance from a pinned volume

related to:
aleph-im/aleph-vm#874

@github-actions
Copy link

Failed to retrieve llama text: POST 503:

503 Service Unavailable


No server is available to handle this request.

@aliel aliel force-pushed the aliel-add-instance-backup-restore-operations branch from e4a8c4c to a8b79ad Compare February 23, 2026 17:14
- Add VmOperation enum to replace raw operation strings
- Fix file descriptor leak in restore_from_file (use context manager)
- Remove duplicated auth-header boilerplate (already handled in _generate_header)
- Route delete_backup and restore_from_volume through perform_operation
- Validate backup_id to prevent path traversal
- Accept Union[str, Path] for rootfs_path
- Remove sync mode from create_backup (server now defaults to async)
- Remove manual Content-Type header (aiohttp sets it via json param)
- Add tests for all new methods"
@aliel aliel requested a review from odesenfans February 24, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants