How do I permanently move the recordings to a new Disk?

All the steps will be made in the Linux console with root privileges. The aim is to move the monitor folder to a different location, in this case in an additional disk mounted on the server.

1.- Stop Asterisk. This step is essential because stopping Asterisk will stop the creation of new recordings.

systemctl stop asterisk

2.- Copy the data from the old to the new location.

rsync -av /var/spool/asterisk/monitor /newdisk_path

3.- Rename the old data directory.

mv /var/spool/asterisk/monitor /var/aspool/asterisk/monitor.old

4.- Create a symlink so /var/spool/asterisk/monitor points to /newdisk_path.

ln -s /newdisk_path /var/spool/asterisk/monitor

5.- Start Asterisk.

systemctl start asterisk

6.- If everything works smoothly, you can delete the backup folder.

rm /var/spool/asterisk/monitor.old
4 Likes