Last active
May 28, 2021 07:36
-
-
Save lmmendes/15c65fb77aec523e836d032b48eee77b to your computer and use it in GitHub Desktop.
Revisions
-
lmmendes revised this gist
May 9, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,19 +31,19 @@ Start save the sabe to the `dump.rdb` file ## Usefull commands Fetch the number of keys inside the database ```` 127.0.0.1:6379> DBSIZE ```` Find the location of the configuration file we need this to find out where is Redis data folder ``` $ redis-cli INFO | grep file config_file:/usr/local/etc/redis.conf ```` Location where the .rdb data files are stored ``` $ cat /usr/local/etc/redis.conf | grep dir --color dir /usr/local/var/db/redis/ -
lmmendes revised this gist
May 9, 2016 . 1 changed file with 13 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ ## Instructions to DUMP localy a Elasticache Redis database Connect to Redis CLI ``` $ redis-cli ``` @@ -18,24 +21,29 @@ Start save the sabe to the `dump.rdb` file 127.0.0.1:6379> BGSAVE ``` ```` 127.0.0.1:6379> SLAVEOF NO ONE ```` ``` 127.0.0.1:6379> EXIT ``` ## Usefull commands # Fetch the number of keys inside the database ```` 127.0.0.1:6379> DBSIZE ```` # Find the location of the configuration file # we need this to find out where is Redis data folder ``` $ redis-cli INFO | grep file config_file:/usr/local/etc/redis.conf ```` # Location where the .rdb data files are stored ``` $ cat /usr/local/etc/redis.conf | grep dir --color dir /usr/local/var/db/redis/ -
lmmendes revised this gist
May 9, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ Connect to Redis CLI ``` $ redis-cli ``` Enable the current redis as a slave for the master node @@ -32,11 +32,11 @@ Start save the sabe to the `dump.rdb` file ``` ``` $ redis-cli INFO | grep file config_file:/usr/local/etc/redis.conf ```` ``` $ cat /usr/local/etc/redis.conf | grep dir --color dir /usr/local/var/db/redis/ ``` -
lmmendes revised this gist
May 9, 2016 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,4 +29,14 @@ Start save the sabe to the `dump.rdb` file ``` 127.0.0.1:6379> EXIT ``` ``` 127.0.0.1:6379> redis-cli INFO | grep file config_file:/usr/local/etc/redis.conf ```` ``` 127.0.0.1:6379> cat /usr/local/etc/redis.conf | grep dir --color dir /usr/local/var/db/redis/ ``` -
lmmendes revised this gist
May 9, 2016 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,15 @@ Start save the sabe to the `dump.rdb` file 127.0.0.1:6379> BGSAVE ``` ```` 127.0.0.1:6379> DBSIZE ```` ```` 127.0.0.1:6379> SLAVEOF NO ONE ```` ``` 127.0.0.1:6379> EXIT ``` -
lmmendes revised this gist
May 8, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ Connect to Redis CLI ``` redis-cli ``` -
lmmendes created this gist
May 8, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ ``` redis-cli ``` Enable the current redis as a slave for the master node ``` 127.0.0.1:6379> SLAVEOF master-node-address.0001.euw1.cache.amazonaws.com 6379 ``` Issue a `sync` command, starting sync operations ``` 127.0.0.1:6379> SYNC ``` Start save the sabe to the `dump.rdb` file ``` 127.0.0.1:6379> BGSAVE ``` ``` 127.0.0.1:6379> EXIT ```