Here’s what I’m trying to do:
- modify a default configuration file on a local machine (Thing.conf).
- save the previous config file on a virtual client to something like Thing.conf.1, and keep track of the previous 10 or so conf files. (Thing.conf.2, Thing.conf.3, etc.)
- push that configuration file to the remote virtual client (/etc/thing/Thing.conf).
to be clear — step 2 is the crux of the problem here, step 1 and 3 are just for context.
The python
loggingframework has aRotatingFileHandler, it also allows you force a rollover withRotatingFileHandler.doRollover(). I’m not sure if that’s what you’re after though. It’ll allow you to roll over the log (config?) files on the virtual client where the logging is presumably being done.