Recent Changes - Search:

Softwares

.

Command-line-backup

Main.Command-line-backup History

Hide minor edits - Show changes to output

November 07, 2011, at 09:00 AM by 117.202.21.41 -
Added lines 1-44:
(:Google1:)
(:Googlemm:)
----
!!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:

(:table border=1 width=70% bgcolor=#cccc99 cellspacing=0 :)
(:cellnr:)
cp -rp /path/to/drupal_site /path/to/backup_dir
(:tableend:)

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:

(:table border=1 width=70% bgcolor=#cccc99 cellspacing=0 :)
(:cellnr:)
tar czf drupalbackup.tgz /path/to/drupal_site/
(:tableend:)

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''':

(:table border=1 width=70% bgcolor=#cccc99 cellspacing=0 :)
(:cellnr:)
mysqldump -u USERNAME -p DATABASENAME > /path/to/backup_dir/database-backup.sql
(:tableend:)

----
(:Google1:)
(:Googlemm:)
Edit - History - Print - Recent Changes - Search
Page last modified on November 07, 2011, at 09:00 AM