This script assumes that you have already installed awscli and have configured it with your credentials. If you have defined a optional subfolder, it will contain the backups to the path defined in REMOTE_S3_PATH. The sync_backups_to_s3.sh script syncs the backups from LOCAL_BACKUPS_PATH to the Amazon S3 bucket specified in REMOTE_S3_BUCKET. See Mitigating Disaster via Website Backups for a detailed writeup. rsync-filter in any directory to define files/folders to ignore. The pull_backups.sh script pulls down the backups created by craft-scripts from a remote server, and synced into the LOCAL_BACKUPS_PATHįor database backups, a sub-directory REMOTE_DB_NAME/db inside the REMOTE_BACKUPS_PATH directory is used for the database backups.įor asset backups, a sub-directory REMOTE_DB_NAME/assets inside the REMOTE_BACKUPS_PATH directory is used for the asset backups.īecause rsync is used for these backups, you can put a. N.B.: The pull_assets.sh script can be used even if the local and remote are on the same server. The directories it will pull down are specified in LOCAL_CRAFT_FILE_DIRS It will also pull down the Craft userphotos and rebrand directories from craft/storage by default. The directories it will pull down are specified in LOCAL_ASSETS_DIRS The pull_assets.sh script pulls down an arbitrary number of asset directories from a remote server, since we keep client-uploadable assets out of the git repo. N.B.: The pull_db.sh script can be used even if the local and remote are on the same server. See Database & Asset Syncing Between Environments in Craft CMS for a detailed writeup. The db dumps that craft-scripts does will exclude tables that are temporary/cache tables that we don't want in our backups/restores, such as the templatecaches table. It backs up your local database before doing the dump. The pull_db.sh script pulls down a database dump from a remote server, and then dumps it into your local database. The above assumes that the current working directory is the project root already. env.sh on your remote server(s) and then add this to your deploy script: If you want to add this to your Forge / DeployBot / Buddy.works deploy script so that caches are auto-cleared on deploy, set up the. It can also clear Redis db caches if LOCAL_REDIS_DB_ID is set, and it can clear FastCGI Cache if LOCAL_FASTCGI_CACHE_DIR is set. The clear_caches.sh script clears the Craft CMS caches by removing all of the craft/storage/runtime/ cache dirs, as well as emptying the craft_templatecaches db table. Note: if you use git, please see the Permissions and Git section below. See Hardening Craft CMS Permissions for a detailed writeup. The set_perms.sh script sets the Craft CMS install file permissions in a strict manner, to assist in hardening Craft CMS installs. env.sh files should work with the latest Craft-Scripts. env.sh file.Ĭraft-Scripts comes with defaults so that even older. To upgrade to a later version of Craft-Scripts, replace the contents of your scripts folder with the newest Craft-Scripts, while preserving your existing. env.sh file into your favorite editor, and replace REPLACE_ME with the appropriate settings.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |