Back up your Drupal files
Copy the contents of your Drupal directory to a directory outside your website, for example /tmp/drupalbackup.
Option 1
Use a basic copy (and paste) to copy all the files (including the .htaccess file) from your Drupal directory to the backup directory:
cp -rp /path/to/drupal_site /path/to/backup_dir
-rp
= recursive and preserve permissions
Option 2
Archive and compress all the files (including the .htaccess file) from your Drupal directory to the backup directory:
- Navigate to your backup directory
tar czf drupalbackup.tgz /path/to/drupal/
This creates a Gzip compressed archive of all the files in the target directory (your Drupal installation directory). If you want to check to make sure this worked use tar xzf drupalbackup.tgz
to extract the files into a new directory.