项目作者: boiler256

项目描述 :
Drupal8 Backup Script
高级语言: Shell
项目地址: git://github.com/boiler256/drupal8_backup_script.git
创建时间: 2020-08-24T11:40:06Z
项目社区:https://github.com/boiler256/drupal8_backup_script

开源协议:GNU General Public License v3.0

下载


Drupal8 Backup Script

Simple BASH script to automate full site backups, keeping your files and database safe, also storing current information about PHP environment

Usage

  1. ./drupal8_backup.sh

Operability confirmed

  • Ubuntu, Debian, CentOS, Unix - like OS

    Requirements

  • zip

Tips/Optional

Uncomment those lines to add additional features to the backup script

Keep needed backups with Find command, by default backups storage locally are 15 days

  1. find $ARCHIVE_DIR -type f -name "$PROJECT_NAME-*" -mtime +15 -delete

Copy backup to a cloud storage (AWS S3)

  1. aws s3 cp $FILE_NAME s3://your_backet/drupal/backup/

Put Drupal8 site to maintenance mode

  1. $DRUPAL_DIR"vendor/bin/drush" vset --always-set maintenance_mode 1

Rebuld Drupal8 Cache

  1. $DRUPAL_DIR"vendor/bin/drush" cr

Restore commands

  1. Unzip
  2. Uplaod/replace mysql database
  3. Adjust settings if changed