Norodo

  • Oh you Baidu, so randumb. (60 sites being indexed at once? Jeez)
  • Posts: 469
Backups
« on June 28th, 2012, 07:42 PM »Last edited on June 29th, 2012, 09:36 AM
Introduction

As you already know, taking backups of your content is important. [1]

Backing up forum data

In order to back up your userbase, threads and posts, you are going to have to copy your database. There are several ways to do this, but the easiest way is by using phpmyadmin[2]

Using phpmyadmin to take a database backup
  • Log on to your phpmyadmin page. It is usually found at mysite.com/phpmyadmin or in an admin panel at your host.
  • Click your way into “databases” and find the one you instructed Wedge to install to. Click it.
  • Press export
  • Make sure all the tables are selected. You can do this by pressing “select all”. Ensure that you've got SQL marked as the desired output.
  • At the bottom, turn on bzip compression. This will severely shrink (75-80%~) the size of the backup, which can get fairly huge with larger forums.
  • Click “Go”
  • Make a nice cup of tea and wait for your file to be downloaded.
Alternatives to phpmyadmin

Using SSH / the command line

Making backups using the command line or SSH is of course also possible. This is generally done with the mysqldump command like this:
Code: [Select]
mysqldump -u user -ppassword database_name > dumpfilename.sql
Where user is the Wedge database user or root. Password is this users password (note that there is no space between -p and the password), database_name is the database name you used for Wedge and dumpfilename.sql is the name and location of the backup file (ie: /home/bob/backup.sql). Your backup file is now available in that location. To conserve bandwidth you might want to compress the file. For simplicity and compatibility we recommend you use bzip or gzip compression, as these can be imported via phpmyadmin easily as long as they're under 8MB or your PHP max limit.

Backing up settings and themes

In order to back up most of your settings, themes and add-ons, you simply have to backup your forum files using FTP or another remote file administration program.

See also

Restoring backups
Automated backups
 1. And if you don't know now, you will know when your data gets lost or corrupted someday.
 2. If you don't know if you have phpmyadmin, ask your provider. phpmyadmin can sometimes be accessed from an admin panel on your webhost, or on yoursite.com/phpmyadmin.
Restoring backups
« Reply #1, on June 28th, 2012, 07:48 PM »Last edited on June 29th, 2012, 09:43 AM
Restoring backups

If you have a small database you can use phpMyAdmin to restore your backup.[1]

Restoring backups with phpmyadmin

  • Open phpMyAdmin[2]
  • Click “databases”, then click “import”.
  • Find your file. You can also see the max size you can upload here.
  • Press go.

Alternatives

If your backup size is too large for your PHP settings, you might have to restore your backup from SSH or command line. To do so, you upload the backup database file to your host, then run
Code: [Select]
mysql -u user -ppassword database_name < dumpfilename.sql
where user is the database user you created for Wedge when you installed or root. Password is the password for that user (there's no space between -p and the password!) database_name is the database you use for Wedge and dumpfilename.sql is the name and location for the sql or sql.bz(x) file you have uploaded. (Ie /home/bob/backup.sql)

See also
Taking backups
 1. The maximum size phpmyadmin can usually handle is around 8MB
 2. If you don't know if you have phpmyadmin, ask your provider. phpmyadmin can sometimes be accessed from an admin panel on your webhost, or on yoursite.com/phpmyadmin

lovestar716

  • Ltettek
  • Viet Nam
  • Posts: 1
Re: Backups
« Reply #2, on August 6th, 2016, 04:31 PM »
thank you very much, I am very confused with this

william777

  • Posts: 17
Re: Backups
« Reply #3, on August 8th, 2016, 11:07 PM »
Thanks Norodo.