Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gawsoftpl/hcloud-snapshots
Create snapshot and restore instance for project
https://github.com/gawsoftpl/hcloud-snapshots
Last synced: about 11 hours ago
JSON representation
Create snapshot and restore instance for project
- Host: GitHub
- URL: https://github.com/gawsoftpl/hcloud-snapshots
- Owner: gawsoftpl
- Created: 2024-10-24T20:09:49.000Z (14 days ago)
- Default Branch: main
- Last Pushed: 2024-10-25T14:53:55.000Z (13 days ago)
- Last Synced: 2024-10-26T07:18:24.550Z (12 days ago)
- Language: JavaScript
- Size: 467 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
Simple create snapshot and restore server from snapshots in hetzner cloud# Commands
Create snapshot with project prefix (will create snapshot for all instances start with eq: test-project-*)
```
PROJECT_PREFIX=test-project
#test-project-master-0
#test-project-master-1
#etc...
``````sh
PROJECT_PREFIX=test-project node snapshot.js
```Restore snapshot
```sh
PROJECT_PREFIX=test-project SSH_KEY_NAME=ssh-test node restore.js
```# ENV
## Required
```sh
PROJECT_PREFIX="" #projectprefix name
HCLOUD_TOKEN="xxx" # Token to hcloud
SSH_KEY_NAME="test" # SSH Key name
```## Optional
```sh
USER_DATA="#cloud-config\nruncmd:\n- [touch, /root/cloud-init-worked]\n"
NO_DELETE_SERVER=1 # Do not delete server after create dump
NETWORKS_FORCE="network-1-network-2" # Network force assigned to instances joined by "-"
```