3.2.1 • Published 5 years ago
mapbox-backup v3.2.1
mapbox-backup
A unofficial command line utility to backup and restore your Mapbox account.
Usage
npm install -g mapbox-backup
mapbox-backup --access-token="sk.xxx" --output path/to/outputThis will backup everything possible (see below) or to only backup a subset of your account use any combination of these:
--styles-listStyle metadata--style-documentsStyles--style-spritesStyle sprites (json and png only, not source SVGs)--tilesets-listTileset metadata--datasets-listDatasets metadata--dataset-documentsDatasets--tokens-listTokens
Scopes
To run the default backup you must provide a Mapbox Access Token with the following scopes (if some are missing the script will attempt to backup as much as it can with the scopes provided).
- styles:list
- styles:read
- tilesets:list
- tilesets:read
- datasets:list
- datasets:read
- fonts:read
- tokens:read
- user:read
Whats Missing?
The following isn't backed up as there is no API support:
- Style icons (your uploaded SVGs) (although you can manually download these from Mapbox Studio via the export function)
- Style fonts (your uploaded fonts)
- Tilesets (your uploaded Shapefiles, GeoJSON, MBTiles, etc)
- Connections between Datasets and Tilesets is only via implicit use of the dataset ID in the tileset ID
- Secret Access Tokens (however this is probably a good thing, if you need to restore from a backup you'll need to refresh any tokens in live use yourself)