Page 1 of 2

Question about backup

Posted: Thu Aug 16, 2018 6:23 pm
by new.new
Let's suppose i do a backup of my board (ACP -> maintenance -> backup), selecting "Full" in "backup type", and selecting all tables in the list.
What data are saved exactly? I supposed all posts and user infos (usernames, hashed passwords etc.) are saved. But what about extensions? are they also saved in the backup file? What about files like user's avatars, emoticon etc? Are they also saved?

Basically the question is: if i restore that backup on another server, will the board look exactly like before? Or do i need to manually save something other?

Also i noticed a strange thing, if i go in ACP->general, i find this data: "Database size: 4.7 MiB". Then i tried to do a backup, and it downloaded an archive that contains a single .sql file that has a size of about 1.1 Mb (uncompressed size). Is it normal this difference in the two values?

Re: Question about backup

Posted: Thu Aug 16, 2018 7:29 pm
by Lumpy Burgertushie
no, that backup in the admin panel is just for the database.

the extensions, images, etc. are all in the files which are in a completely different place on the server.

to back them up, you do a backup of all the files using ftp.

then, in order to completely recover back to the beginning, you would have to import your database backup ( sql file ) to the database on the server and also, upload all of the files that you downloaded using ftp, back to the server using ftp.

then you should have a completely recovered board.

this type of backup is only needed just to be safe. when doing an update/upgrade etc. you do that backup first, just in case the aliens come in and zap your server or something while you are doing the update/upgrade.

robert

Re: Question about backup

Posted: Thu Aug 16, 2018 7:41 pm
by cleverwise
The database size difference is probably normal. MySQL should be configured to use InnoDB as the storage engine.

InnoDB has many reasons for the larger size than when your data is dumped. For starters as data grows InnoDB will grow the space required which makes sense. However if some of that data is deleted the engine will not release that space back to the filesystem. So if InnoDB requires 5MBs and data is removed so it fits in 1MB well 5MB is still "used".

Also InnoDB stores data and keys differently from say MyISAM. This results in larger tables. If you want read up on all the technical reasons behind InnoDB's B-Tree index storage.

I haven't seen the file so can't say 100% but what you describe is normal. For example I have one data set that is 56MB dumped but like 210MB according to InnoDB. That is normal. I generally see 3 to 4 times the size, however your mileage may vary.

Re: Question about backup

Posted: Thu Aug 16, 2018 8:42 pm
by Lumpy Burgertushie
and/or it is just a difference in how the database backup is constructed. in other words, is is data only or data and structure etc.

does it have only inserts or does it contain both values and inserts etc. etc.

bottom line is, when you make a backup it is always a good idea to check it to see if all the tables are there.

once you get the backup file on your computer, unzip it and then open the sql file in a good text editor.

scroll down to the bottom, make sure it has the zebra table since that is the last one.


robert

Re: Question about backup

Posted: Thu Aug 16, 2018 9:44 pm
by new.new
Thanks for your answer
So, it's there some documentation on how to do a complete backup/restore (ex. what folders are to be saved etc.) ?

Re: Question about backup

Posted: Thu Aug 16, 2018 10:56 pm
by Lumpy Burgertushie
pretty simple.

complete backup:
1. using phpmyadmin or whatever your host provides for database management, export the complete database that you are using for your board.
2. using ftp, backup your complete phpbb folder/files. if you have your board in a folder named phpBB3 then just download that folder to your computer and you are done.
if it is named something else like "forum" etc. download whatever folder it is in.
if your board is in the root of your domain then most likely it will be in the directory named "public_html" or "htdocs" or whatever your home directory is on your server.
on your computer, make a folder called backup or whatever you want. then download all of the files/folders that belong to phpbb to that folder on your computer.

done.

rob ert

Re: Question about backup

Posted: Fri Aug 17, 2018 8:35 am
by new.new
If I understand well, i've simply to download the entire phpbb folder from my server, and export the SQL database
And the backup feature in the ACP it's only a fast backup of the most important data, but if i donwload the entire folder i don't have to do also this backup, right?

And what about the restore?
Do I have just to copy the phpbb folder on the new server? Or do I have to do other operations?

Re: Question about backup

Posted: Fri Aug 17, 2018 9:41 am
by Mick
The easiest way is to follow the relevant sections (backup/restore) of Transferring Your Board to a New Host or Domain.

Re: Question about backup

Posted: Fri Aug 17, 2018 11:59 am
by Brf
new.new wrote:
Fri Aug 17, 2018 8:35 am
And the backup feature in the ACP it's only a fast backup of the most important data, but if i donwload the entire folder i don't have to do also this backup, right?
The ACP backup is backing up your database. The database is not in your folder.

Re: Question about backup

Posted: Fri Aug 17, 2018 5:01 pm
by Lumpy Burgertushie
the reason we suggest to use phpmyadmin to export/backup your database instead of using the phpbb backup is because the phpbb backup will sometimes time out before it is finished. it also gives you no warning that it has done so.

I believe this is due to some server setups but I am not sure why it happens, it just does some times.

doing it as an export from phpmyadmin eleminates this problem.


robert

Re: Question about backup

Posted: Fri Aug 17, 2018 9:35 pm
by new.new
Lumpy Burgertushie wrote:
Fri Aug 17, 2018 5:01 pm
the reason we suggest to use phpmyadmin to export/backup your database instead of using the phpbb backup is because the phpbb backup will sometimes time out before it is finished. it also gives you no warning that it has done so.

I believe this is due to some server setups but I am not sure why it happens, it just does some times.

doing it as an export from phpmyadmin eleminates this problem.


robert
can i use phpmyadmin also to restore the backup?

Re: Question about backup

Posted: Fri Aug 17, 2018 11:56 pm
by stevemaury
Yes.

Re: Question about backup

Posted: Sat Aug 18, 2018 2:54 am
by John connor
If you intend on using Filezilla, read this. https://www.phpbb.com/support/docs/en/3 ... filezilla/

Re: Question about backup

Posted: Sat Aug 18, 2018 12:06 pm
by jonhcarter
here is the simple method:

Login in to cPanel > backup > create full backup & download backup.

this will backup your entire data & any host can restore it for you, just provide them full backup file.

Re: Question about backup

Posted: Sat Aug 18, 2018 2:16 pm
by Lumpy Burgertushie
that is not entirely true.

as with the post above. cpanel is only used by some (most) hosting companies. other hosting management software will be completely different.

also, in cpanel when you do that backup, it backs up the whole server not just the board. that may or may not be what you need to do.

following the instructions given in this post and the documentation is the best way to backup and restore phpbb for most people.



robert