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.
- Stop Asterisk. This step is essential because stopping Asterisk will stop the creation of new recordings.
systemctl stop asterisk
- Copy the data from the old to the new location.
rsync -av /var/spool/asterisk/monitor /newdisk_path
- Rename the old data directory.
mv /var/spool/asterisk/monitor /var/aspool/asterisk/monitor.old
- Create a symlink so /var/spool/asterisk/monitor points to /newdisk_path.
ln -s /newdisk_path /var/spool/asterisk/monitor
- Start Asterisk.
systemctl start asterisk
- If everything works smoothly, you can delete the backup folder.
rm /var/spool/asterisk/monitor.old