NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

SR2017's avatar
SR2017
Aspirant
Nov 24, 2017

Scheduling file deletion

Absolute beginner with no NAS experience.  I have a sql maintenance plan backing up data from the sql server to a share on the NAS.   I need to create a clean up routine to delete files older than 3 days.  How do you do automated tasks ?

 

4 Replies

  • There's no way to automate file deletion.

     

    What you can do is schedule a daily backup - either use incremental rsync (set to delete files not on the source) or another protocol (full backup, set to delete all files in the destination share).  Either way will work, incremental rsync is more efficient.

     

    Then set up custom snapshots on the share with three days retention.

     

    The result will be that the main share will have just the most recent backup, but you can still get back the previous day's backups by restoring the snapshots.

    • SR2017's avatar
      SR2017
      Aspirant
      Thank You StephenB. I have a lot to learn. I'll put this solution in place.
      • Sandshark's avatar
        Sandshark
        Sensei

        It certainly should be possible to set up a cron job that uses the find command to delete files older than some amount, but that can't be done via the GUI and is not somethng I'd recommend a beginner try his hand at.  A robocopy command on a Windows machine would be yet another way to do it.  Using an rsync copy is the most straightforward method do-able via the GUI and strictly running on the NAS.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More