Add restore command
PATCH 1/1 Add restore command
This patch adds a 'restore' command to nfacct commands. It takes the output of 'list' command and use it to restore the counters. Basically, the user can save the counter with:
nfacct list >nfacct.dump
And restore them with:
nfacct restore <nfacct.dump
--- nfacct.8 | 4 ++++ src/nfacct.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 53 insertions(+), 10 deletions(-)
nfacct.8 +4 -0
@@ -17,6 +17,10 @@ specified at any given time. .BI "list " List the existing accounting object in table. .TP +.BI "restore " +Restore accounting object table by reading from stdin. Input format is the one used +as output by the list command. +.TP .BI "add " Add new accounting object. .TP
src/nfacct.c +49 -10
116 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Pablo Neira Ayuso
maintainerQuoted 6 lines · Eric Leblond
This patch adds a 'restore' command to nfacct commands. It takes the output of 'list' command and use it to restore the counters. Basically, the user can save the counter with:
nfacct list >nfacct.dump
And restore them with:
nfacct restore <nfacct.dump
Thanks a lot, this is good, I was expecting someone to take it and to add support for that :-).
Hello,
Quoted 10 lines · Pablo Neira Ayuso
Quoted 6 lines · Eric Leblond
This patch adds a 'restore' command to nfacct commands. It takes the output of 'list' command and use it to restore the counters. Basically, the user can save the counter with:
nfacct list >nfacct.dump
And restore them with:
nfacct restore <nfacct.dumpThanks a lot, this is good, I was expecting someone to take it and to add support for that :-).
I've just pushed this patch to nfacct git tree.
BR,
Signature · 2 lines
Eric Leblond <[email protected]> Blog: https://home.regit.org/