Backup Help

Hello everyone.

We want to backup recorded phone calls. The issue is that it’s hundreds of calls a day and the monitor folder is quite large in size.
We currently have a dedicated backup job to backup this folder only, but it takes hours to complete and only backs up certain folders, we restored some of these backups and the total size after restore was only 18gb…

So we are thinking of running a backup job which will only backup recorded calls from the last week.

We were thinking of including in the file path some variables (not sure if even possible) which will backup only the current week"s folders & files.

Or… Run a pre-upgrade script which will copy this week’s files to a dedicated “backup container” folder then run backup on this folder, and finally run a post-backup script which will delete all files in the “backup container”

Not sure which way is the best way to accomplish this.

Any ideas?


If you have rsync of any form

rsync -z  --progress --remove-source-files --files-from=<(find /var/spool/monitor -mtime +7 -type f -exec basename {} \;) /var/spool/monitor/  /dst_path

could be a good starting point for a Cron job

Thank you. Regarding cron job, you mean that I should rather use cron than a backup pre and post script?

The Cron job will anchor in time when the ‘script’ is run, what I posted is the ‘script’ in entirety , no pre or post anything needed.

If you want the recordings in both places then in cron

20 4 * * 7 sync -a /var/spool/monitor/  /dst_path

is all you need. It only copies new files every Sunday morning at 4 20 am

What I want really is the /dst_path to have recordings from the last 7 days only at the time backup is running. Makes sense?


20 4 * * 7 rsync   --progress  --files-from=<(find /var/spool/monitor -mtime -7 -type f -exec basename {} \;) /var/spool/monitor/  /dst_path

/dst_path could be of the form

[email protected]:/dest_path

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.