database stuff
database backup
store mysql datapase pass in /root/.my.cnf so our script can access it.
Chmod 600 –> is the way to go
[client]
user=root
password=crazypass
backup one user database
mysqldump --add-drop-table --databases yourdatabasename > /home/<username>/backups/db/$(/bin/date +\%Y-\%M-\%D).sql.bak
backup all databases
...
systemctl and journalctl
some commands that are usefull
systemctl
# list all units / services
systemctl list-unit-files
# manipulate service
systemctl status | start | enable | restart | stop service
# start/stop the service at boot
systemctl enable | disable service
# check the defined targets
systemctl list-units --type=target
journalctl
# general log viewin...
ssh stuff
ssh tunneling
ssh -L 1234:localhost:8080 remoteuser@remoteserver.net
cypher problem
sudo cat /etc/ssh/ssh_config
--> uncomment this part
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
--> and add:
sudo vim ~/.ssh/config
Host 192.168.0.3
KexAlgorithms +diffie-hellman-group1-sha1
HostKeyAlgorithms +ssh-ds...
vagrant and ansible
vagrant
I’m using mac m1 and some things like vmware currently work funny.
In multy vm setup I needed to run the first machine with “vagrant up” and then uncomment other two machines to avoid the problem being stuck on assigning address or key generation.
and yes….I’m playing with this so.. ;-)
“Vagrant” File
# -*- mode: ruby -*-
# vi...
65 post articles, 17 pages.