File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -269,12 +269,18 @@ The first authorize screen(htpasswd;username or password) and phpmyadmin login s
269269
270270This will back up the all files and folders, once per day, and write it to ./backups with a filename like backup-2022-02-07T16-51-56.tar.gz
271271
272- #### example for crontab file
272+ #### example for crontab file on the host machine
273273
274274##### # old docker backup folder remove
275+
276+ ```
27527750 23 * * * find ${DIRECTORY_PATH}/backups/backup* -type f -mtime +1 | xargs rm
278+ ```
276279
277280##### # backup exclude wordpress, backups folders in ${DIRECTORY_PATH}
281+
282+ ```
27828300 01 * * * tar -czvf ${DIRECTORY_PATH}/backups/'backup-example.com-'$(date +"\%Y-\%m-\%dT\%H-\%M-\%S")'.tar.gz' --exclude='wordpress/wp-admin' --exclude='wordpress/wp-includes' --exclude='backups' ${DIRECTORY_PATH}
284+ ```
279285
280286[ CronHowto] ( https://help.ubuntu.com/community/CronHowto )
You can’t perform that action at this time.
0 commit comments