Skip to main content

run_copy_prefix

Function run_copy_prefix 

Source
pub fn run_copy_prefix(
    client: &mut RespClient,
    src_prefix: &[u8],
    dst_prefix: &[u8],
    rate: u64,
) -> Result<Export>
Expand description

copy-prefix: SCAN src prefix, re-key under dst prefix via read+rebuild frames (the server has no COPY verb; TTL carried as absolute PEXPIREAT). Rate-limited per source key.

Returns what it copied and what it could not — same contract as export, for the same reason: the rebuild set does not cover every type, and a copy that quietly drops one is worse than a refusal.