Advertisement:

Author Topic: Прочистване на базата данни след обновяване (Large upgrade) на SMF  (Read 5065 times)

Offline Hatshepsut

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • bgnacionalisti.org/ on Facebook
    • Bulgarian Nationalist Forum
Здравейте,

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

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

Offline @Bogo

  • Jr. Member
  • **
  • Posts: 308
  • Gender: Male
  • SMF 2.0.15
    • Mercedes-Benz forum
 :D :D с копче няма ли ....козата си сака пръч. Това да не е виц да го разкажеш и да те разберат. Има ,  да, но ти няма как да го направиш. Кои ти даде тоя акъл да ползваш бета версия... то пише ама кои да чете...

Offline Hatshepsut

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • bgnacionalisti.org/ on Facebook
    • Bulgarian Nationalist Forum
Дали ще ползвам бета версия или някаква друга, си е моя работа. Освен това аз имам два форума - единият е тестов, а другия е работещ. И давата форума са на един и същ домейн, и двата са с една и съща версия. Аз пробвам първо инсталациите и настройките на тестовия форум, а пък после - на работещия.
А за прочистването на базата данни - рано или късно ще се науча как става и ще го направя  :)

Offline @Bogo

  • Jr. Member
  • **
  • Posts: 308
  • Gender: Male
  • SMF 2.0.15
    • Mercedes-Benz forum
Ползвай квото искаш. Успех!  :) :) :)

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Бих искал да разбера как да се прочисти базата данни след ъпгрейда. Има ли предвидена някаква процедура в админ панела за прочистване на базата данни от архивните записи или пък някакъв инструмент в 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?"..."

Offline Hatshepsut

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • bgnacionalisti.org/ on Facebook
    • Bulgarian Nationalist Forum
Аглийският език не е най-силната ми страна, но ще се опитам да обясня същността на проблема  :)

I have one live forum with SMF 2.1

Code: [Select]
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:


Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
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?"..."

Offline Hatshepsut

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • bgnacionalisti.org/ on Facebook
    • Bulgarian Nationalist Forum
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  :)

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
"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?"..."