- Backup Webradios folder and redis hash to samba accessible directory
- Copy from source RAS via Samba to destination RAS
- Restore redis hash
- Turn on MPD autorefresh
- Restore Webradios directory
- Clean up
You will need a control computer to SSH into each RAS and copy the files via Samba. We will use the LocalStorage folder for copying files.
Backing Up
ssh into the Source RAS
- Code: Select all
cd /mnt/MPD/LocalStorage
tar -czvf wr.tgz ../Webradio
redis-cli --raw dump webradios | head -c-1 > wr.dmp
Copy the control computer copy the files from the Source RAS LocalStorage Samba share to the Destination RAS LocalStorage Samba share. Ensure that MPD source autorefresh is enabled on the Destination RAS.
Restore
ssh into the Destination RAS
- Code: Select all
cd /mnt/MPD
cat LocalStorage/wr.dmp | redis-cli -x restore webradios 0
tar -xzvf LocalStorage/wr.tgz
rm LocalStorage/wr.dmp LocalStorage/wr.tgz
Thats it!