You are here

brush alias for Backdrop site

Submitted by Alan Mels on Wed, 12/09/2020 - 03:19

/home/docker/.brush/mysite.aliases.brushrc.php

  1. <?php
  2. /**
  3.  * @file mysite.aliases.brushrc.php
  4.  * Site aliases for [your site domain]
  5.  * Place this file at ~/.brush/ (~/ means your home path)
  6.  *
  7.  * Usage:
  8.  * To copy the development database to your local site:
  9.  * $ brush sql-sync @mysite.local @mysite.prod
  10.  * To copy your local database to the development site:
  11.  * $ brush sql-sync @mysite.local @mysite.dev --structure-tables-key=common --no-ordered-dump --sanitize=0 --no-cache
  12.  * To copy the production database to your local site:
  13.  * $ brush sql-sync @mysite.prod @mysite.local
  14.  * To copy all files in development site to your local site:
  15.  * $ brush rsync @mysite.dev:%files @mysite.local:%files
  16.  * Clear the cache in production:
  17.  * $ brush @mysite.prod clear-cache all
  18.  *
  19.  * You can copy the site alias configuration of an existing site into a file
  20.  * with the following commands:
  21.  * $ cd /path/to/settings.php/of/the/site/
  22.  * $ brush site-alias @self --full --with-optional >> ~/.drush/mysite.aliases.brushrc.php
  23.  * Then edit that file to wrap the code in < ? php ? > tags.
  24.  */
  25.  
  26. /**
  27.  * Local alias
  28.  * Set the root and site_path values to point to your local site
  29.  */
  30.  
  31. $aliases['dev'] = array (
  32. 'root' => '/var/www/docroot',
  33. 'uri' => 'express.docksal',
  34. 'path-aliases' =>
  35. '%brush' => '/var/www/brush',
  36. '%modules' => 'modules',
  37. '%themes' => 'themes',
  38. '%files' => 'files',
  39. ),
  40. );
  41.  
  42. $aliases['prod'] = array (
  43. 'uri' => 'nyexpress.us',
  44. 'root' => '/home/nyexpress/public_html',
  45. 'remote-user' => 'nyexpress',
  46. 'remote-host' => '216.218.139.246',
  47. 'ssh-options' => '-p 19759', // To change the default port on remote server
  48. 'path-aliases' => array(
  49. '%dump-dir' => '/tmp',
  50. '%modules' => 'modules',
  51. '%themes' => 'themes',
  52. '%files' => 'files',
  53. ),
  54. 'source-command-specific' => array (
  55. 'sql-sync' => array (
  56. 'no-cache' => TRUE,
  57. 'structure-tables-key' => 'common',
  58. ),
  59. ),
  60. // No need to modify the following settings
  61. 'command-specific' => array (
  62. 'sql-sync' => array (
  63. 'sanitize' => TRUE,
  64. 'no-ordered-dump' => TRUE,
  65. 'structure-tables' => array(
  66. // You can add more tables which contain data to be ignored by the database dump
  67. 'common' => array('cache', 'cache_filter', 'cache_menu', 'cache_page', 'history', 'sessions', 'watchdog'),
  68. ),
  69. ),
  70. ),
  71. );
  72. ?>