Recent Changes - Search:

Softwares

.

Command-line-backup


Command line backup.


Copy all files to a backup directory

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

The option -rp means copy recursive and preserve permissions.

Put files in compressed archive

Alternatively, you can archive and compress all the files (including the .htaccess file) from your Drupal directory to the backup directory. From your Drupal directory execute:

tar czf drupalbackup.tgz /path/to/drupal_site/

If you want to check to make sure this worked use tar xzf drupalbackup.tgz to extract the files into a new directory.

Back up database

Before making a database backup, it is recommended to turn off cron jobs.

MySQLdump

Mysqldump lets you create a copy of the database:

mysqldump -u USERNAME -p DATABASENAME > /path/to/backup_dir/database-backup.sql


Edit - History - Print - Recent Changes - Search
Page last modified on November 07, 2011, at 04:00 AM