This is a simple command line application to import/export storage data from Caddy v2 (or Certmagic).
Right now supports the following modules:
redis
(caddy-tlsredis)
First we need to build the command:
cd cmd/migrator
go build
Now we can import existing data with the following command:
./migrator import /path/to/existing/caddypath <module-name>
...or export the redis data to the filesystem:
./migrator export <module-name> ./any/folder
Optionally the command accepts the flag -config path/to/file.json
.
The JSON file should contain at least the storage configuration:
{
"storage": {
"..."
}
}