forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: abdullah on November 16, 2006, 03:48:37 am

Title: how do we take a backup of the gallery?
Post by: abdullah on November 16, 2006, 03:48:37 am
Hello I would like to know if somebody could tell me how to take a backup of the gallery just in case if i loose my host and so tht i could use the backup file to restore the files?

Waiting for a reply. Thanks in advance. Am new here so I dont know much, sorry if I made any mistakes.
Title: Re: how do we take a backup of the gallery?
Post by: Nibbler on November 16, 2006, 04:10:27 am
Backup the files via FTP and your database with phpmyadmin. Please read the FAQ before you post.

http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#BackupDatabase
Title: Re: how do we take a backup of the gallery?
Post by: Stramm on November 16, 2006, 10:28:58 am
backing up the files on a nix system using the shell:
tar -czvf coppermine.tar /usr/local/home/sitename.com/htdocs/coppermine/
creates an archive of the given path in the actual directory with the name coppermine.tar   
extract with: tar -xvf coppermine.tar
--> this file you can download to your local system

backup of the mysql db using the shell:
mysqldump -u dbusername -p --opt dbname > dbname.bak.dump
dbusername = your MySQL database Username
dbname = name of your database (eg. cpg1410)
example: mysqldump -u Stramm -p --opt cpg1410 > cpg1410.bak.dump

instead of cpg144.bak.dump you can use a path as well /path/to/your_backup_file/cpg1410.bak.dump

Enter -> now type your db password -> inow you've the backup file in your www root cpg1410.bak.dump

restore: mysql -u dbuser -p dbname < cpg1410.bak.dump


to find this again some keywords: restore database backup shell dump
Title: Re: how do we take a backup of the gallery?
Post by: Joachim Müller on November 16, 2006, 07:23:51 pm
Side note: The shell method explained by Stramm is very fast and failsafe, only drawback is that most users on shared hosting don't have shell access, at least on budget webhosting.