<< Click to Display Table of Contents >> Navigation: Installation > Backup and archive Audio File / Setup > Install on-premise server synchronisation service > Installation on-premise - Linux Server |
1. S3 bucket for call recordings
2. Access key and secret of IAM user having read/write access on S3 bucket
3. Region of S3 bucket like eu-central-1 for Frankfurt region
4. Linux 3CX server sudo access via putty.
Install AWS CLI on the server where the phone system stores the audio files
Download link - https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Type sudo aws configure and enter. It will ask for access key → secret key → region. For optional file format type enter directly.
3. cd /opt
4. sudo mkdir mirage
5. cd mirage
6. sudo nano s3upload.sh
7. Copy and paste script code - Download TXT file
8. ctrl + o and enter. Then ctrl +x to exit
9. run sudo chmod +x *.sh to make file executable
10. Make test call recording
11. run sudo ./s3upload.sh and it should upload call recording
12. Check using sudo aws s3 ls s3://bucket-name --recursive
13. To create scheduler type sudo crontab -e
14. Select editor 1 for nano default if asked.
15. Go to last line enter and paste * * * * * /opt/mirage/s3upload.sh
16. Enter for new line after the command
17. ctrl + o save
18. ctrl + x exit.
19. It shud say crontab installed successfully.
20. sudo crontab -l will list all jobs
21. For test run make a call recording.
22. Go to call recording folder, e.g. cd /var/lib/3cxpbx/Instance1/Data/Recordings/ and ls to check if recording is there
23. After 1minute run - sudo aws s3 ls s3://bucket-name --recursive
24. The recording should be in s3 bucket.
25. If it works fine type sudo crontab -e
26. Change first * to 0 so it looks like 0 * * * *.
27. Make another call recording and check after 1hr.
28. Run sudo aws s3 ls s3://bucket-name --recursive to verify