usage: fcpc epoch [-h] [--epochcopy.update_imported EPOCHCOPY.UPDATE_IMPORTED]
[--epochcopy.erase_before EPOCHCOPY.ERASE_BEFORE]
[--epochcopy.create_before EPOCHCOPY.CREATE_BEFORE]
[--epochcopy.copy_link_destinations EPOCHCOPY.COPY_LINK_DESTINATIONS]
{add,add-if-not-exists,add-or-update,collection-status,commit,copy,del,erase,reopen,status}
[params ...]
positional arguments:
{add,add-if-not-exists,add-or-update,collection-status,commit,copy,del,erase,reopen,status}
Epoch subcommand.
Choices:
add
add-if-not-exists
add-or-update
collection-status
commit
copy
del
erase
reopen
status
params Name (default: None)
optional arguments:
-h, --help show this help message and exit
--epochcopy.update_imported EPOCHCOPY.UPDATE_IMPORTED
If set to 1, copy from epoch will update imported
time[Defined:fcplib.cmd.epoch] (default: 0)
--epochcopy.erase_before EPOCHCOPY.ERASE_BEFORE
If set to 1, copy to epoch will erase destination
epoch first[Defined:fcplib.cmd.epoch] (default: 0)
--epochcopy.create_before EPOCHCOPY.CREATE_BEFORE
If set to 1, copy to epoch will erase destination
epoch first[Defined:fcplib.cmd.epoch] (default: 0)
--epochcopy.copy_link_destinations EPOCHCOPY.COPY_LINK_DESTINATIONS
If set to 1, links will be copied with objects they
are refering to[Defined:fcplib.cmd.epoch] (default: 1)
Epoch is something like complete database of assets within time.
Epoch does not contain global or config data like tags
It just contains all network objects (hosts, interfaces, vulnerabilities, patches, ...) in defined time
Epoch can have one or more history objects. See 'fcpc help history'.
There can be any number of epochs and each of them is independent "snapshot" of database.
Every database has at least one epoch, which name is 'init'. This is first epoch within system.
Objects can be added, modified or deleted within epoch. All operations are saved into history.
But there is a limitation. We cannot make a differencial queries for same object within same epoch.
For example, if we add object host/abcd and will modify it later during same epoch, we know that object was modified,
we know which process/job modified it but we cannot see more.
If we want to know real differences of sam object within time, we need to have more epochs and do diff between them.
Epoch can be used even for testing. Just create test epoch, do some work and then delete it.
Epoch is added but it is not part of timeline until committed.
fcpc epoch add epoch_name
fcpc epoch del xxx
Only committed epoch are part of timeline.
Without name, last epoch is committed
fcpc epoch commit [name]
fcpc epoch reopen [name]
fcpc epoch erase xxx
epoch copy fromepoch toepoch query
you can use {last} or {previous} keyword to point to last or prev epoch