Прочистване на базата данни след обновяване (Large upgrade) на SMF

Started by Hatshepsut, September 01, 2018, 02:41:49 AM

Previous topic - Next topic

Hatshepsut

Здравейте,

Преди няколко дни обнових софтуера на моя форум чрез Large upgrade от версия SMF 2.1 Beta 3 до версия SMF 2.1 Beta 4.
По време на инсталацията избрах опцията "Backup database with smf_ prefix" (или нещо подобно беше, не съм много сигурен за текста)  ::)
След обновлението, което бе успешно, забелязах в cPanel, че размерът на базата данни се е увеличил двойно - от 64 МВ на 128 МБ.
Това не е особено притеснително, защото лимитът за база данни е 1 GB, но ако размерът на базата данни е примерно 550 МБ и се избере тази опция, след ъпгрейда размерът ѝ ще надхвърли лимита.

Бих искал да разбера как да се прочисти базата данни след ъпгрейда. Има ли предвидена някаква процедура в админ панела за прочистване на базата данни от архивните записи или пък някакъв инструмент в cPanel?

@Bogo

 :D :D с копче няма ли ....козата си сака пръч. Това да не е виц да го разкажеш и да те разберат. Има ,  да, но ти няма как да го направиш. Кои ти даде тоя акъл да ползваш бета версия... то пише ама кои да чете...

Hatshepsut

Дали ще ползвам бета версия или някаква друга, си е моя работа. Освен това аз имам два форума - единият е тестов, а другия е работещ. И давата форума са на един и същ домейн, и двата са с една и съща версия. Аз пробвам първо инсталациите и настройките на тестовия форум, а пък после - на работещия.
А за прочистването на базата данни - рано или късно ще се науча как става и ще го направя  :)

@Bogo


GigaWatt

Quote from: Hatshepsut on September 01, 2018, 02:41:49 AM
Бих искал да разбера как да се прочисти базата данни след ъпгрейда. Има ли предвидена някаква процедура в админ панела за прочистване на базата данни от архивните записи или пък някакъв инструмент в cPanel?

Clear your Error Log... that's about the only thing I could recommend without more info (mods installed, etc.).




Изчистете регистрационния файл за грешки ... това е единственото нещо, което можех да препоръча без повече информация (инсталирани модификации и т.н.).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Hatshepsut

Аглийският език не е най-силната ми страна, но ще се опитам да обясня същността на проблема  :)

I have one live forum with SMF 2.1

https://bg-nacionalisti.org/BNF/index.php?action=forum

It was installed with SMF 2.1 Beta 3, and then upgraded to Beta 4.
Installed mods - only Tinyportal, Simple Audio Video Embedder, and SMF Gallery.

During the upgrade process, I have checked the option: "Backup database with smf_ prefix"
After upgrade, the size of the forum database was increased (2x) from 64 MB to 128 MB.

That's no errors, upgrader just has duplicated all database records, adding "backup" prefix:


GigaWatt

Quote from: Hatshepsut on September 11, 2018, 12:50:10 AM
That's no errors, upgrader just has duplicated all database records, adding "backup" prefix:

...

Well, that's basically the backup. If you want to download just the backup of the database, in phpMyAdmin select those tables that have the "backup" prefix in them, go to the Export tab and export them. You'd get a clean backup of your database, but if you'd want to restore that backup, you'd have to upload that dump in a clean database and remove the prefix "backup" in all of the tables. You could actually do that now by exporting the backup (explained previously), define a new database in cPanel, upload the database dump with the "backup" prefixes in that newly created database, rename the tables (remove "backup" in the name of the tables) and export that newly created database ;). You can delete the newly created database afterwards.

In any case, you should have done a manual database and files backup before doing the upgrade. Sure, the upgrade procedure does offer this option, but it's not recommended to use it since the best and most secure way SMF could do this is what it actually did - create a duplicate of all of the tables with a different name (adding "backup" in the name of the tables) within the same database.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Hatshepsut

Quote from: GigaWatt on September 11, 2018, 07:53:48 PM
Quote from: Hatshepsut on September 11, 2018, 12:50:10 AM
That's no errors, upgrader just has duplicated all database records, adding "backup" prefix:

...

Well, that's basically the backup. If you want to download just the backup of the database, in phpMyAdmin select those tables that have the "backup" prefix in them, go to the Export tab and export them. You'd get a clean backup of your database, but if you'd want to restore that backup, you'd have to upload that dump in a clean database and remove the prefix "backup" in all of the tables. You could actually do that now by exporting the backup (explained previously), define a new database in cPanel, upload the database dump with the "backup" prefixes in that newly created database, rename the tables (remove "backup" in the name of the tables) and export that newly created database ;). You can delete the newly created database afterwards.

In any case, you should have done a manual database and files backup before doing the upgrade. Sure, the upgrade procedure does offer this option, but it's not recommended to use it since the best and most secure way SMF could do this is what it actually did - create a duplicate of all of the tables with a different name (adding "backup" in the name of the tables) within the same database.

Thanks  :)

GigaWatt

"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Hatshepsut

Проблемът е вече решен - днес изтрих от базата данни всички дублирани таблици, създадени по време на предишните инсталации.
Оказа се, че процедурата е много лесна - в phpMyAdmin маркирах всички таблици с префикс 'backup' от базата данни, после избрах процедурата "Изтриване" и всички те бяха изтрити :)

Маркирам темата като 'Solved'.

Advertisement: