### Intent

Regulations in GDPR foresee an age limit to all data that is kept in any given system.

These scripts are meant to allow you to make sure you keep no log data older than a number of days as defined by yourself in any of the filewave system's logfiles.

### Server Logfile Cleanup script

#### Testing the script / previewing effects

Please define the number of days that information in log files should persist by modifiying the following line in the downloaded script , replacing the default 10 with the number of days you prefer (must be greater than 0):

daystokeep=10 #minimum of 1 day

Mac or Linux server - needs to be run as root

/usr/local/filewave/python/bin/python ./clean-fwxserver-logfiles.py

Windows Server - needs to be run as administrator - Please note that this will temporarily shut down your filewave server services !

"C:\Program Files (x86)\FileWave\python\python.exe" .\clean-fwxserver-logfiles.py

The script will now tell you what files it would delete :

DRYRUN - logfile /fwxserver/DB/pg_data/pg_log/postgresql-pre-pgbadger.log would be erased if dryrun=False

and which files it would modify , generating a preview either in /tmp ( macOS or Linux based server ) or in C:\temp ( Windows based server ) :

DRYRUN - logfile content would be modified if dryrun=False; writing preview of pruned file to : /tmp/postgresql-2018-05-01_160839.log

#### Usage in Production

After you have verified the script works as you expect it to , replace the following line in the script :

dryrun=True

using the following line :

dryrun=False

Mac or Linux server - this script needs to be run as root - schedule a cronjob to run the script daily. Please make sure to change "/full/path/to" using the full path to the python script on the server.

/usr/local/filewave/python/bin/python /full/path/to/clean-fwxserver-logfiles.py

Windows Server - create a scheduled task to run this script daily

"C:\Program Files (x86)\FileWave\python\python.exe" C:\full\path\to\clean-fwxserver-logfiles.py

### macOS Client Logfile Cleanup script

#### Testing the script / previewing effects

Please define the number of days that information in log files should persist by modifiying the following line in the downloaded script , replacing the default 10 with the number of days you prefer (must be greater than 0):

daystokeep=10 #minimum of 1 day

If you are running FileWave Client using a specific locale , please adjust the following value to the same one you are using for fwcld :

language_locale='en_US'

macOS Client - needs to be run as root

python ./clean-macOS-fwcld-logfiles-including-locale.py

#### Usage in Production

After you have verified the script works as you expect it to , replace the following line in the script :

dryrun=True

using the following line :

dryrun=False

Mac Client : Deploy the script using a fileset , as a verification script to ensure daily execution