Keywords: WordPress - Linux - How to - Other
I am using bitnami LAMP server and I have my wordoress files and folders located in this path: /opt/bitnami/apache2/htdocs
I want to create a crontab to zip all these files and folders in "htdocs" directory every week (on Friday as example) and but this (.zip_backup file in this path /home/bitnami/backups
What command should I inserted it in crontab -e ?
I used this one:
00 2 * * 5 zip -r /home/bitnami/backups/test_`date +\%F`.zip /home/bitnami/htdocs
is that correct? I notice that it backup all the path, I want just all the files and directors under htdocs ..
Also how can I excluded a directory from being zipped ? for example I want the cache directory (/opt/bitnami/apache2/htdocs/wp-content/cache) to not included while creting a .zip file