Simple Deno script that can export your data (Horizons, Instances, Collections) from Deta Space.
Make sure you have Deno installed (see Deno Docs for instructions).
Clone this repository:
git clone https://github.com/BetaHuhn/deta-space-exporter
Navigate into the repository:
cd deta-space-exporter
To use the script you need to provide your Deta Space Access Token. You can either provide it as an environment variable:
DETA_ACCESS_TOKEN=<your-access-token> ./deta-space-exporter
or create a .env
file in the root of the repository with the following content:
DETA_ACCESS_TOKEN=<your-access-token>
You can either run the compiled binary:
./deta-space-exporter
or run it via the Deno run
command:
deno run --allow-net --allow-read --allow-write --allow-env --allow-run main.ts
To export your data you need to first create snapshots and then download them. This is two separate steps as creating snapshots might take some additional time.
To create snapshots you can use the create
command and optionally provide a scope:
./deta-space-exporter create <scope>
Available scopes:
horizons
instances
collections
If no scope is provided snapshots will be created for all three.
To download snapshots you can use the download
command and optionally provide a scope:
./deta-space-exporter download <scope>
Available scopes:
horizons
instances
collections
If no scope is provided snapshots will be downloaded for all three.
--output=<path>
- The path where the snapshots should be saved (default:./exports
)--unzip=<boolean>
- Unzip the snapshots after downloading (default:true
)
The snapshots will be saved in the ./exports
folder by default. You can change this by providing the --output
argument with a path:
./deta-space-exporter download --output <path>
By default the script will unzip the snapshots. You can disable this by providing the --no-unzip
argument:
./deta-space-exporter download --no-unzip
Create snapshots for all data:
./deta-space-exporter create
Download snapshots for all data:
./deta-space-exporter download
Create snapshots your Collections:
./deta-space-exporter create collections
Download snapshots for your Collections:
./deta-space-exporter download collections
This project is licensed under the MIT License - see the LICENSE file for details