Migration helper can help you with the migration of PHP session files to the Redis database. TTL helper configures TTL of already existing keys.
-
clone this repository
-
build the binary
go build cmd/migration/main.go
or
go build cmd/ttl/main.go
-
get the help
./main -h
-
migrate the sessions
go run cmd/migration/main.go -files '/tmp/bla/sess_*'
or set the TTL
go run cmd/migration/main.go -ttl 336h -keys 'PHP*'
please note the apostrophes in the -files or -keys flags. This is to prevent globbing.