Cobra Forum

Plesk Panel => Others => Topic started by: Administrator on Dec 29, 2022, 08:14 AM

Title: How to set up log storage for a long term in Plesk?
Post by: Administrator on Dec 29, 2022, 08:14 AM
Important
Answer
To set up a non-standard period of log storage, do the following:
Here's how the typical script setup steps look like:
# # make sure the script is executable
# chmod +x archive-logs.sh
# # check help
# ./archive-logs.sh --help
# # create a config from sample
# ./archive-logs.sh -s > config.sh
# # edit it to suite your environment and target storage
# # execute the script with the config to check everything works as expected
# ./archive-logs.sh -c config.sh -l debug
# # add the command to root cron with desired period: "/path/to/archive-logs.sh -c /path/to/config.sh"
# # note that "-c /path/to/config.sh" can be skipped if the file is in the same directory as the "archive-logs.sh" script
[/list]