Migrating old data
To migrate your old data (from the time before Stethoscope started tracking your data), you can migrate it using the Stethoscope Integrations CLI.
Before proceeding with this guide, make sure you have Node.js and git installed. You can visit the Node.js website and the Git website for instructions for downloading and installing Node.js and git respectively.
First, clone your repository and set your working directory as the repository
- Clone your repository (see Cloning a repository)
- Enter the directory (
cd stethoscope
) in a terminal window
Add all required environment variables, which you have added as GitHub repository secrets, to a .env
file. Detailed documentation about which environment variables are required for each service are available in Integrations:
Then, we will run the Stethoscope Integrations CLI using npx. Select which integration's data you want to migrate. For example, to migrate your RescueTime data from January 26, 2020:
In the above shell command, the parts are:
npx
is the package runner for Node.js@stethoscope-js/integrations
is the Stethoscope Integrations and CLI packagemigrate
is the CLI command used for performing data migrationsrescuetime
is the name of the service2020-01-26
is the date to start from in the YYYY-MM-DD format
Once completed all service migrations, commit your data and push your changes.