8000 Add MIGRATE documentation. · devsnippet/phpredis@6510bd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6510bd9

Browse files
committed
Add MIGRATE documentation.
1 parent 82a5f70 commit 6510bd9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.markdown

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,3 +2535,17 @@ $redis->set('foo', 'bar');
25352535
$val = $redis->dump('foo');
25362536
$redis->restore('bar', 0, $val); // The key 'bar', will now be equal to the key 'foo'
25372537
</pre>
2538+
2539+
## migrate
2540+
##### Description
2541+
Migrates a key to a different Redis instance.
2542+
##### Parameters
2543+
*host* string. The destination host
2544+
*port* integer. The TCP port to connect to.
2545+
*key* string. The key to migrate.
2546+
*destination-db* integer. The target DB.
2547+
*timeout* integer. The maximum amount of time given to this transfer.
2548+
##### Examples
2549+
<pre>
2550+
$redis->migrate('backup', 6379, 'foo', 0, 3600);
2551+
</pre>

0 commit comments

Comments
 (0)
0