Number of files in my test recap var log:
[root@gnu ~]# find /var/log/recap |wc -l
170580
Dry run
[root@gnu ~]# recaplog -n
2017-01-06 17:41:16+00:00 [INFO] --- Starting dry run ---
Antes: | |
1 - #linux_mx: ban *!*jb@unaffiliated/jebus [by adams.freenode.net, 2495219 secs ago] | |
*2 - #linux_mx: ban *!*@189.238.179.202 [by adams.freenode.net, 2495219 secs ago] | |
3 - #linux_mx: ban *!*jebus*@* [by adams.freenode.net, 2495219 secs ago] | |
*4 - #linux_mx: ban *!*jebus@201.127.83.* [by adams.freenode.net, 2495219 secs ago] | |
5 - #linux_mx: ban *!*bba00294@*.187.160.2.148 [by adams.freenode.net, 2495219 secs ago] | |
*6 - #linux_mx: ban *!*BlouBlou@unaffiliated/bloublou [by adams.freenode.net, 2495219 secs ago] | |
7 - #linux_mx: ban *!*bba0ea2f@*.187.160.234.47 [by adams.freenode.net, 2495219 secs ago] | |
8 - #linux_mx: ban jebus!*@* [by adams.freenode.net, 2495219 secs ago] | |
*9 - #linux_mx: ban *!*dasda@unaffiliated/jebus [by adams.freenode.net, 2495219 secs ago] |
$ nc -vw1 google.com 443 </dev/null | |
Ncat: Version 7.00 ( https://nmap.org/ncat ) | |
Ncat: Connected to 173.194.205.101:443. | |
Ncat: 0 bytes sent, 0 bytes received in 0.09 seconds. |
for letter in {A..Z}; do echo -n "${letter}":; links -dump http://www.behindthename.com/namesakes/list/tolkien/alpha|awk '/IMG/ {print $1}'| grep -c ^${letter}; done | |
A:100 | |
B:83 | |
C:28 | |
D:45 | |
E:60 | |
F:59 | |
G:70 | |
H:63 | |
I:28 |
Number of files in my test recap var log:
[root@gnu ~]# find /var/log/recap |wc -l
170580
Dry run
[root@gnu ~]# recaplog -n
2017-01-06 17:41:16+00:00 [INFO] --- Starting dry run ---
Currently:
| | Installation | Configuration | Troubleshooting | Patching | | --- | --- | --- | --- | --- | --- | | Apache | Yes | Yes | Yes | Yes | | NGINX | Yes | Yes | Yes | Yes |
without bolds and centered:
| | Installation | Configuration | Troubleshooting | Patching |
[root@gnu recap]# cat recaplog.log | |
2017-03-03 17:02:56+00:00 [INFO] --- Starting run --- | |
2017-03-03 17:02:56+00:00 [INFO] Compressing old log files | |
2017-03-03 17:02:56+00:00 [INFO] Packing fdisk... | |
2017-03-03 17:02:56+00:00 [INFO] Moving 144 logs to: /var/log/recap/fdisk_daily_20170302 | |
2017-03-03 17:02:56+00:00 [INFO] Compressing 144 logs into: /var/log/recap/fdisk_daily_20170302.log.tar.gz | |
2017-03-03 17:02:56+00:00 [INFO] Deleting 144 logs. | |
2017-03-03 17:02:56+00:00 [INFO] Packing mysql... | |
2017-03-03 17:02:56+00:00 [INFO] Moving 144 logs to: /var/log/recap/mysql_daily_20170302 | |
2017-03-03 17:02:56+00:00 [INFO] Compressing 144 logs into: /var/log/recap/mysql_daily_20170302.log.tar.gz |
[root@gnu ~]# recaplog -n
2017-03-10 15:43:18+00:00 [INFO] recaplog (13279): Created lock file: /var/lock/recaplog.lock
2017-03-10 15:43:18+00:00 [INFO] --- Starting dry run ---
2017-03-10 15:43:18+00:00 [INFO] Not compressing old log files
2017-03-10 15:43:18+00:00 [INFO] Packing fdisk...
2017-03-10 15:43:18+00:00 [ERROR] An error ocurred while reading logs: 'ls: cannot access /var/log/recap/fdisk_20170309-*.log: No such file or directory', skipping...
2017-03-10 15:43:18+00:00 [INFO] Packing mysql...
2017-03-10 15:43:18+00:00 [ERROR] An error ocurred while reading logs: 'ls: cannot access /var/log/recap/mysql_20170309-*.log: No such file or directory', skipping...
2017-03-17_17:39:30
Error when attempting to read: /root/.my2.cnf,/root/.my2.cnf,/root/.my3.cnf, please check the DOTMYDOTCNF setting in the configuration file
# cat "mysql.log_snapshot_2017-03-17_17:37:08"
2017-03-17_17:37:08
PREFIX
:root@docker:/recap# make PREFIX=/tmp/other/usr install
Installing scripts...
Installing man pages...
Installing configuration...
Installing cron job...
Installing docs...
Creating log directories...
The way of updating images is assuming you keep images based on a TAG
Before updating images make sure there are no images without a TAG, delete any that is not making use of one, see Removing old images down below.
images=$( docker images --format '{{ $image:=split .Repository "/" }}{{ index $image 1 }}:{{.Tag}}' )
for image in ${images}; do
docker pull ${image}
done