Hello there,
I am evaluating this program to be our knowledge base system and i had to say it's pretty good!!
Now I get a new requirement which is how can I backup the data periodically in phpMyfaq??
I notice there is a handy tool in the admin page that I can backup the data and logs manually and restore it afterwards.
But is there any recommendation or insight on how to do it automatically and periodically ??
I searched in the form and some topics mentioned mysqldump +crontab, is it the best way to do it?
*In fact, I have tried to use mysqldump but failed to restore the database in this way*
backup:
mysqldump --user=root -p mydb > /backup/mydb.sql
restore:
mysql --user=root -p mydb < /backup/mydb.sql
Any ideas would be highly appreciated... Thanks indeed in advance!
What's the Best Practice to backup database periodically?
Moderator: Thorsten
-
- Posts: 5
- Joined: Thu Jun 02, 2011 5:38 am
-
- Posts: 200
- Joined: Tue Nov 02, 2010 9:08 am
- Location: United States-Ohio
- Contact:
Re: What's the Best Practice to backup database periodically
Yes mysqldump would be the preferred method for most.... But the backup in the Admin would prolly be the easiest and quickest......unfortunately there is no way to set up within phpMyFaq to set up to automatically and periodically back up database.... it has to be done manually within phpmyfaq.... But i guess it also could depend on the Enviroment....
You can always go to propsal on the forum to propose new features for future releases viewforum.php?f=4
The Lead Developer Thorsten might be able to offer more insight on this subject, as he is a very busy person so it might take some time for him to respond, thats why i thought i would send a quick message...
You can always go to propsal on the forum to propose new features for future releases viewforum.php?f=4
The Lead Developer Thorsten might be able to offer more insight on this subject, as he is a very busy person so it might take some time for him to respond, thats why i thought i would send a quick message...
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
Amazon.com Wishlist
Re: What's the Best Practice to backup database periodically
I have two ubuntu servers set up as virtual machines hosting my faq instance, as well as 2 other open source cms projects. I have a script which runs nightly to sync the contents and databases between both systems. I have .sh scripts which are scheduled on the production and the failover servers which contain the lines below. I scheduled these to run as cron jobs.
Here is how I am backing up the databases:
mysqldump --all-databases --add-drop-table -u root -pyourpassword >/var/sync/dbsync.sql
Here is how I am restoring them:
mysql -u root -pyourpassword < /var/cp/dbsync.sql
I think the problem you are experiencing is in the syntax, Do not put = after -u, and do not put a space between -p and the password.
Here is how I am backing up the databases:
mysqldump --all-databases --add-drop-table -u root -pyourpassword >/var/sync/dbsync.sql
Here is how I am restoring them:
mysql -u root -pyourpassword < /var/cp/dbsync.sql
I think the problem you are experiencing is in the syntax, Do not put = after -u, and do not put a space between -p and the password.
Re: What's the Best Practice to backup database periodically
You could use mysqldump in a cron job. Or use a backup service such as Tomahawk to automate and send it off-site.