阿里云备份

来自ling
跳转至: 导航搜索

数据库备份

php备份

备份

tar -zcvf /alidata/phpproject.cn.tar.gz /opt/phpproject.cn
tar -zcvf /alidata/svndata.tar.gz /alidata/svndata

解压

tar -zxvf /alidata/phpproject.cn.tar.gz /opt
tar -zxvf /alidata/svndata.tar.gz /opt
 tar -zcvf /alidata/dockerdata/nexus.tar.gz /alidata/dockerdata/nexus
 tar -zxvf /alidata/dockerdata/nexus.tar.gz

2020-04-01

备份

tar -zcvf /alidata/dockerdata/mysqldata.tar.gz /alidata/dockerdata/mysqldata
tar -zcvf /alidata/dockerdata/mysqldata.tar.gz /alidata/dockerdata/mysqldata

2020-08-20

sudo docker run --name mysql --restart=always  -p 3308:3306 -v /alidata/dockerdata/mysqldata/mysql-cloud:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=Wb19831010! -d mysql:5.7.18

sudo docker run --name mediawiki -it -p 73:80 \
-v /alidata/dockerdata/mediawiki/mediawiki-1.28.2:/var/www/html \
-v /alidata/dockerdata/mediawiki/images:/var/www/html/images \
-v /alidata/dockerdata/mediawiki/php/php.ini:/usr/local/etc/php/php.ini \
-v /alidata/dockerdata/mediawiki/LocalSettings.php:/var/www/html/LocalSettings.php \
--link mysql:mysql -d docker.ling2.cn/phpserver

tar -zcvf /alidata/dockerdata/mediawiki/images.tar.gz /alidata/dockerdata/mediawiki/images
tar -zxvf /alidata/dockerdata/mediawiki/images.tar.gz /alidata/dockerdata/mediawiki/images
sudo chmod 755 -R /alidata/dockerdata/mediawiki/images
sudo docker restart mediawiki

tar -zcvf /app/onlyoffice.tar.gz /app/onlyoffice
tar -zxvf onlyoffice.tar.gz

tar -zcvf /alidata/dockerdata/neo4j.tar.gz /alidata/dockerdata/neo4j

tar -zcvf /alidata/dockerdata/fileroot/BOOK.tar.gz /alidata/dockerdata/fileroot/BOOK

tar -zcvf /alidata/dockerdata/postgresql.tar.gz /alidata/dockerdata/postgresql

 /alidata/dockerdata/mediawiki/images
 
 
 sudo ln -s /volume3 /app
 

sudo chown 999:999 /app/onlyoffice/mysql/logs;

sudo chmod 400 /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key

sudo chmod 400 /app/onlyoffice/CommunityServer/data/certs/onlyoffice.key


sudo sudo docker network create --driver bridge onlyoffice

sudo chmod 0644 /app/onlyoffice/mysql/conf.d/onlyoffice.cnf

sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mysql-server -p 3307:3306 \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -v /app/onlyoffice/mysql/logs:/var/log/mysql \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_DATABASE=onlyoffice \
 mysql:5.7


sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server -p 59:80 \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \
    onlyoffice/documentserver


sudo docker run --init --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
 -e MYSQL_SERVER=onlyoffice-mysql-server \
 -e MYSQL_SERVER_PORT=3306 \
 -e MYSQL_ROOT_USER=root \
 -e MYSQL_ROOT_PASSWD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice_mailserver \
 -v /app/onlyoffice/MailServer/data:/var/vmail \
 -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
 -v /app/onlyoffice/MailServer/logs:/var/log \
 -h yourdomain.com \
 onlyoffice/mailserver

Where ${MAIL_SERVER_IP} is the IP address for Mail Server. You can easily get it using the command:

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server


sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server -p 60:80 -p 1443:443 -p 5222:5222 \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \
 -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
 -e MAIL_SERVER_API_HOST=172.18.0.3 \
 -e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
 -e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
 -e MAIL_SERVER_DB_PORT=3306 \
 -e MAIL_SERVER_DB_USER=root \
 -e MAIL_SERVER_DB_PASS=my-secret-pw \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 onlyoffice/communityserver

2020-11-09

sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server -p 60:80 -p 1443:443 -p 5222:5222 \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \
 -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
 -e MAIL_SERVER_API_HOST=172.18.0.4 \
 -e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
 -e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
 -e MAIL_SERVER_DB_PORT=3306 \
 -e MAIL_SERVER_DB_USER=root \
 -e MAIL_SERVER_DB_PASS=my-secret-pw \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 onlyoffice/communityserver:10.5.3.1172

2020-12-09

tar -zcvf /app/onlyoffice.tar.gz /app/onlyoffice
tar -zxvf /app/onlyoffice.tar.gz /app
sudo docker rm -f onlyoffice-community-server
sudo docker rm -f onlyoffice-document-server
sudo docker rm -f onlyoffice-mail-server
sudo docker rm -f onlyoffice-mysql-server

2021-10-19

tar -zcvf /alidata/dockerdata/elasticsearch.tar.gz /alidata/dockerdata/elasticsearch
tar -zxvf /alidata/dockerdata/elasticsearch.tar.gz /alidata/dockerdata