Tự động sao lưu cơ sở dữ liệu lên Object Storage tại X-OR Cloud
Hướng dẫn triển khai backup tool sử dụng tại X-OR Cloud và X-OR Storage
Last updated
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
apt install nodejs -ygit clone https://github.com/X-OR-Cloud/xor-backup-db-s3-destination.gitnpm install -g pm2cd xor-backup-db-s3-destinationvim .envAPP_NAME="XOR Database Backup S3 Destination"
API_PORT=8000
S3_HOST="https://s3.xorcloud.net"
S3_ACCESS_KEY=""
S3_SECRET_KEY=""
S3_REGION=default
S3_BUCKET=""
TELEGRAM_BOT_TOKEN=
TELEGRAM_ROOM_ID=
MYSQL_HOST=
MYSQL_PORT=
MYSQL_USERNAME=
MYSQL_PASSWORD=
TIME_START_BACKUP_MYSQL="0 0 * * *"
MONGODB_HOST=
MONGODB_PORT=
MONGODB_USERNAME=
MONGODB_PASSWORD=
TIME_START_BACKUP_MONGODB="0 0 * * *"npm install
pm2 start "npm start" --name backuptail -f ./logs.txt