Apt recreate files
Reinstall package and recreate filesapt-get -o Dpkg::Options::="--force-confmiss" install --reinstall PACKAGE_NAME
Reinstall package and recreate filesapt-get -o Dpkg::Options::="--force-confmiss" install --reinstall PACKAGE_NAME
ansible-playbook --limit '!hoost1:!host2' yourPlaybook.yml
Move shards from one node to anothercurl -XPOST 'http://localhost:9200/_cluster/reroute' -d '{"commands" : [{"move" :{"index" : "indexname", "shard" : 1,"from_node" : "nodename", "to_node" : "nodename"}}]}'
Get docker ip addressesdocker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
In order to download only package via apt, with a particular version
apt-get install --download-only metricbeat=7.6.1
.deb package you'll find atls -l /var/cache/apt/archives
Show cert namescertbot certificates
Delete standalone certificate with:certbot delete --cert-name CERT_NAME
In order to clean up journalctl logs use
Set time retentionjournalctl --vacuum-time=2d
Set size retentionjournalctl --vacuum-size=500M
Set rate limmiting
in nginx.conf http block set:limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
Show docker swarm nodes labelsdocker node ls -q | xargs docker node inspect -f '{{ .ID }} [{{ .Description.Hostname }}]: {{ .Spec.Labels }}'
Check node iddocker node ls