Question: Backup with cron job

Backup with cron job

Dear Sir, Good day, each time cron job is running it is generating a new backup file, and the cycling are 30 days, so we have 30 backups which is too many days, is there a way we can set th

SF

Saif Fuad

Asked
Dear Sir,
Good day, each time cron job is running it is generating a new backup file, and the cycling are 30 days, so we have 30 backups which is too many days, is there a way we can set that to 4 days only for example ?

Regards.
  • MS

    Mian Saleem

    Answered
    Hello,

    You will need to modify the `db_backup` method of `app/models/admin/Cron_model.php` around line no 177

    ```
    if ($now - filemtime($file) >= 60 * 60 * 24 * 30) {
    ```

    with

    ```
    if ($now - filemtime($file) >= 60 * 60 * 24 * 4) {
    ```
  • SF

    Saif Fuad

    Answered
    Wonderful
  • Login to Reply