Redis migration operation encountering NOKEY error

In an effort to transfer all my keys from database 1 to database 2 in Redis, I am executing the following command:

select 1 to switch to database 1

MIGRATE localhost 6380 "" 2 50000 AUTH my_password  COPY KEYS

However, this results in a NOKEY error. Could someone please advise me on what may be causing this issue?

Answer №1

Because you have not specified any specific keys for migration.

If you are using the KEYS option, make sure to list the keys after this option:

MIGRATE localhost 6380 "" 2 50000 AUTH my_password COPY KEYS key1 key2 key3 ...

To successfully migrate keys from one database to another, you must first scan and identify these keys in the source database.

In your situation, consider using the COPY command instead of the MIGRATE command if you are on Redis version 6.2.0 or newer.

You can try executing the following command as a one-liner:

redis-cli --scan | xargs -I {} redis-cli copy {} {} DB 2

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can you stop data URI from being cached as an image source?

I am facing an issue where I have an img-tag with a data-image base64 URI as the source. Browsers tend to cache this source, which is causing problems for me. If it were a normal URL, I could easily prevent caching by adding a random query-parameter value. ...

In ES6, the hoisting of block-scoped variables into the for loop header in

Do block scope variables in a for loop get hoisted above the loop header? var y = 4; for(let j = 3; j < y; j++) { let y = 2; ... } Will this trigger a dead-zone error on y each time j is compared to y in the loop header? I ...

Looping Through Dates in a Month Using MySQL for Individual Rows

I have a unique situation involving two specific tables within my database. The first table is the Jobs table, which serves as the master list of all available jobs. The second table is the Allocations table, which keeps track of all transactions related t ...

Material UI - Panel Expansion does not cause the div above to resize

Scenario : Utilizing leaflet and React-table together in one component. Two divs stacked vertically - one containing a leaflet map and the other a react-table. The second div has Expansion Panels with react-table inside. Issue : Problem arises when ...

The correct conclusion is reached by the function when the console.log statement is placed above the function call

By moving the console.log above the function call, the correct conclusion is reached. I double-checked multiple times by toggling the console.log on and off. Running on node.js v16.4.2. The input data is accurate. I attempted to replicate the issue in a di ...

Issues with Subject.subscribe occurring beyond the constructor

If you're looking for a straightforward service, I've got just the thing for you. import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class XmlService { items$: Subject<Item[]> = ...

Developing several sliders and ensuring they operate independently of each other

I am currently in the process of developing multiple sliders for a website that I am building. As I reach the halfway point, I have encountered a problem that has stumped me. With several sliders involved, I have successfully obtained the length or count ...

Compiling Vue components upon insertion into the DOM

Is there a way to dynamically insert a compiled element into the DOM, without having a pre-defined location as instructed in the documentation? var res = Vue.compile('<div><span>{{ msg }}</span></div>') new Vue({ data: ...

Images are not appearing when using ng-repeat

const createFullName = (first, last) => { return `${last}, ${first}`; }; let partyImage = ""; if(party=="R") { partyImage = "<img src='/images/r.png'>"; } else { partyImage = "<img src='/images/d.png'>"; } l ...

Issue: Angular 14 - Validators Not Resetting in Nested FormGroup

I am currently working on implementing a nested FormGroup. However, I have encountered an error when attempting to reset the form. Here is the structure of the form: form: UntypedFormGroup; this.form = this.fb.nonNullable.group({ f1: [''], f2: ...

Methods for dynamically adjusting content based on window width in Three.js

Currently, I have implemented a basic window resizing code in my project: function onWindowResize() { windowHalfX = window.innerWidth / 2; windowHalfY = window.innerHeight / 2; camera.aspect = window.innerWidth / window.innerHeight; came ...

Is it possible to include a module-level controller within a directive?

I am currently navigating the complexities of controllers, modules, and services in Angular JS. In my attempt to integrate a controller into my directive, I faced an issue. The controller I intend to reference belongs to the same module as the directive, ...

What is the best method to retrieve the id of a div when a button inside it is clicked?

I have a variety of panels, each with an "Add" button: <div id="panel1"> <input type="button" id="addbut" value="Add it"></input> </div> <div id="panel2"> <input type="button" id="addbut" value="Add it"></input> & ...

Imported information from a single database table column into a spreadsheet in Excel

I'm looking to extract information from a specific column in my table titled "hote_line." The column I want to pull data from is called "elite" and it contains 15,346 names along with additional details. Is there a method by which I can transfer this ...

Is there a way to transfer a value from my JavaScript game directly into a Flask database?

Currently, I am working on developing a JavaScript game embedded in a website that utilizes a Flask database. For some added context, my goal is to allow users to earn virtual currency, known as Lamocoins, by playing the mini-game. However, I seem to be f ...

Encountering difficulties in auto-wiring Spring repository beans

I am encountering the following error repeatedly: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'StorageItemRepository' In my beans.xml, I have all set to find - located in META-INF/beans ...

Using a Hook inside a React function is not possible

I encountered an error message known as the "invalid hook call error" while using the useEffect hook in my code. According to the documentation, this issue usually arises due to either a version mismatch or incorrect function calls. Could someone kindly r ...

Tips for displaying negative numbers as positive in AngularJS

After fetching data from the server using $http.Get, I have a function that calculates the total value. The total value comes out as negative (-370), which is correct. However, when I try to use this value to create an angular chart, I need to display it a ...

Using URL parameters in Node.js applications

I am encountering an issue with my nodejs setup, and I am hoping someone can assist me. My challenge lies in trying to pass a parameter with a specific value to a page.html file, like this: page.html?s=1 However, I am encountering a problem where the pa ...

An element failing to submit using AJAX requests

I have a login form with an <a> element that I want to use for making a post request. However, when I'm examining the backend Django code during debugging, it seems to interpret the request method as GET instead of POST. HTML <form id= ...