Description of problem:
The targetcli configuration is easy to lost since it only backup the latest configuration.
Version-Release number of selected component (if applicable):
Consider the following scenario.
Steps to Reproduce:
1. /> set global auto_save_on_exit=true
2. service targetcli stop
>> this will execute 'targetcli clearconfig confirm=true' to cleanup the current targetcli configuration
3. run targetcli then exit, the current configuration will saved and the users will lost their previous configuration.
So we should have several enhancement.
1. when execute 'service targetcli stop' please notice the users what happens.
It should tell the user the current configuration is cleaned and if they want to restore it please run 'service targetcli start' or targetcli restoreconfig
2. please don't overwrite the /etc/target/saveconfig.json.backup, rename it to saveconfig.json.backup.2012xxxx etc and move it to /etc/target/backup.
The /etc/target/saveconfig.json is important so we should keep tracking the its changes.
It's better to automatically archive/backup existing targetcli configuration.
1. I don't know if systemd has capabilities to output messages to the user when units are started/stopped.
2. Yes it would be nice to keep maybe X last configurations (X=10 maybe), labeled by date. I'll work on that.
(In reply to comment #3)
> 1. I don't know if systemd has capabilities to output messages to the user
> when units are started/stopped.
> 2. Yes it would be nice to keep maybe X last configurations (X=10 maybe),
> labeled by date. I'll work on that.
I vote for keeping multiple last configurations.
we now keep 10 previous configs.