Create Cleaner Job

The DB cleaner job is created on the master server, or the primary master server in a redundant installation.

The server performs the database cleaning daily and deletes all files, depending on the system settings, see Database Cleaning.

Copy the following commands into the shell as root.

Note - since this command also uses the .my.cnf of the jtel user, the backup should be set up first.

cat << 'EOF' > /etc/cron.daily/db_cleaner.cron
#!/bin/bash
su - jtel -c 'bash /home/jtel/shared/JTELCarrierPortal/DB/mySQL/cleaners/db_cleaner.sh'
EOF

chmod 750 /etc/cron.daily/db_cleaner.cron
chmod 750 /home/jtel/shared/JTELCarrierPortal/DB/mySQL/cleaners/db_cleaner.sh
  • No labels