Thẻ: rsync
-
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/