Skip to content

Commit

Permalink
feat(redis): create instructions to extract redis data to a text file
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed May 10, 2024
1 parent 53c5b82 commit 7016a9d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data-migration/redis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pyenv/
dump.rdb
dump.txt
23 changes: 23 additions & 0 deletions src/data-migration/redis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Redis migration

## Get the data

1. Use the `redis-cli save` command to export a `dump.rdb`.
1. Place it in this folder

## Setup python

1. Use venv to create a virtual env.
- `python -m venv pyenv`
1. Install the packages
- source ./pyenv/bin/activate
- pip install -r requirements.txt

## Extract from the RDB

1. Covert the redis dump to key value pairs
- rdb --command justkeyvals ./dump.rdb | sort > dump.txt

## Filter the data

## Load the data
Empty file.
3 changes: 3 additions & 0 deletions src/data-migration/redis/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rdbtools
python-lzf
setuptools

0 comments on commit 7016a9d

Please sign in to comment.