Thẻ: server
-
Moving server with docker, rsync
sudo docker ps #Show container id #chat service sudo docker exec -i {CONTAINER_ID} /usr/bin/mongodump –uri “mongodb://” –archive > /mnt/storage/mongodb.dump sudo docker exec -i {CONTAINER_ID} /usr/bin/mongorestore –uri “mongodb://” –archive –drop < /mnt/storage/mongodb.dump #database sudo docker exec -i {CONTAINER_ID} mysql -uhanda -p{PASSWORD} handa < /mnt/storage/database.sql #storage log sudo rsync -avh target_server:/var/www/storage/ /mnt/storage/
-
Kiểm tra xem đứa nào đang kết nối tới cổng nào trên server – ddos
netstat -tn 2>/dev/null | grep :3306 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -nr | head netstat -tn 2>/dev/null | grep :80 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -nr | head netstat -tn 2>/dev/null | grep :443 |…