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:
- Open a terminal window.
- Run the following command to edit the dragonfly.service file:
sudo nano /etc/systemd/system/dragonfly.service
- In the dragonfly.service file, add the following lines to the [Unit] section:
Description=Dragonfly Service
After=network.target
- In the [Service] section, add the following lines:
ExecStart=/usr/bin/dragonfly
Restart=always
- Save the dragonfly.service file and exit the nano editor.
- Run the following command to reload the systemd daemon:
sudo systemctl daemon-reload
- Run the following command to enable the dragonfly.service service to start automatically at boot:
sudo systemctl enable dragonfly.service
- 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
- Dragonfly, https://www.dragonflydb.io/
No comments:
Post a Comment