Friday, 21 July 2023

Dragonfly : source-available, multi-threaded Redis® replacement built for modern cloud workloads

 

Migrasi Single Node Redis ke Dragonflydb

File backup redis : dump.rdb

Pastikan dragonlydb service sudah mati.

sudo systemctl stop dragonfly.service

load dump.rdb ke memory dengan dragonfly : 

sudo dragonfly --logtostderr --dbfilename dump

dengan redis-client, save ke format dfs :

redis-cli
save df

Hapus data lama, dan pindahkan data baru :

 sudo rm /var/lib/dragonfly/
 

dari path tadi menjalankan perintah  load dump.rdb :

sudo mv *.dfs /var/lib/dragonfly/

Jalankan dragonfly :

sudo systemctl start dragonfly.service


How to make dragonfly service start automatically in debian 12

To make the dragonfly.service start automatically in Debian 12, you can use the following steps:

  1. Open a terminal window.
  2. Run the following command to edit the dragonfly.service file:
sudo nano /etc/systemd/system/dragonfly.service
  1. In the dragonfly.service file, add the following lines to the [Unit] section:
Description=Dragonfly Service
After=network.target
  1. In the [Service] section, add the following lines:
ExecStart=/usr/bin/dragonfly
Restart=always
  1. Save the dragonfly.service file and exit the nano editor.
  2. Run the following command to reload the systemd daemon:
sudo systemctl daemon-reload
  1. Run the following command to enable the dragonfly.service service to start automatically at boot:
sudo systemctl enable dragonfly.service
  1. Run the following command to start the dragonfly.service service:
sudo systemctl start dragonfly.service

The dragonfly.service service should now start automatically at boot and whenever your system restarts.

Referensi

  1. Dragonfly, https://www.dragonflydb.io/

No comments:

Post a Comment