Drupal - site backup #terminal #drupal
#1 site backup - copy the live-docs folder
$ mkdir ~/drupal_dumps/PROJECT_NAME
# copy and retain permissions
$ sudo cp -a ./* ~/dumps/PROJECT_NAME/
# copy
$ cp -r ./* ~/drupal_dumps/PROJECT_NAME/
#2 do a db backup (make sure -u is mysql unsername)
$ mysqldump -u -p --add-drop-table DATABASENAME > ~/DATABASENAME.sql
#3 CD to website and run
$ drush up drupal
# or
$ drush up --security-only
# ---
#Set the password for any user
$ drush upwd admin --password="admin"
# Recursive removal:
$ rm -rf /path/to/directory