Welcome, Guest. Please Login or Register.
April 18, 2024, 04:50:40 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  FAQ  |  FAQ: HowTo Save/Restore the database data « previous next »
Pages: [1] 2 3 Reply Ignore Print
Author Topic: FAQ: HowTo Save/Restore the database data  (Read 132441 times)
andrea
Global Moderator
YaBB God
*****
Posts: 4400


Peace on Earth

WWW
FAQ: HowTo Save/Restore the database data
« on: December 14, 2002, 06:01:39 AM »
Reply with quote

  • with phpMyAdmin one can save or restore the db date or move them to a different server:
    YaBB SE Database Tutorial: Save/Restore with phpMyAdmin
    (the tutorial contains also a restore script of Dave Smulders which allows to restore big dump files)
  • save/restore or move to a different server by script:
    Backup Script of Greg Robson
  • by this mod a backup/restore script can be activated in the admin menu:
    Backup Database Mod by SK15
  • The current version of YaBB SE contain a save option in the admin menu
  • for big databases you will find shell commands for saving and restoring in the replies below
    « Last Edit: June 30, 2003, 05:41:18 AM by andrea » Logged

    andrea
    Global Moderator
    YaBB God
    *****
    Posts: 4400


    Peace on Earth

    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #1 on: December 14, 2002, 06:03:32 AM »
    Reply with quote

    Can this be moved into the FAQ board?

    Questions:
    • is there a mod to put Gregs backup script into the admin menu?
    • is Dave Smulders backup manager  in development?
    • did I omit in the above list some different backup/restore method?
    Logged

    David
    Destroyer Dave
    Global Moderator
    YaBB God
    *****
    Posts: 5761


    I'm not a llama!

    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #2 on: December 14, 2002, 06:08:19 AM »
    Reply with quote

    I also have a nice cronjob script that I use to do backups, willing to share it if there is interest.
    Logged

    Omar Bazavilvazo
    YaBB SE Developer
    YaBB God
    *****
    Posts: 2153


    I never said I would stay to the end...

    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #3 on: December 14, 2002, 06:19:39 AM »
    Reply with quote

    share it plz :)

    I don't it won't hurt to share it to all ppl interested (included me) :P

    ja ne!
    Logged

    Greetings from México!
    http://omarbazavilvazo.com
    Mi foro Español-Japonés
    http://hablajapones.org
    http://hablajapones.org/index.php/japones/tutoriales/b16.php

    NO me manden IM para soporte o dudas
    ...Leo los foros como todos...
    David
    Destroyer Dave
    Global Moderator
    YaBB God
    *****
    Posts: 5761


    I'm not a llama!

    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #4 on: December 14, 2002, 06:28:09 AM »
    Reply with quote

    Very simple little script.  Replace the CAPS with the needed values.  For the paths you must use full paths, not relative.  In the end it creates the file timestamp-db.sql.gz.  You can rename the file if you wish but if you want the timestamp make sure you leave in $DATESTAMP.  You can run this from the command line if you make it executable or set it up to run via cron.

    #! /bin/sh

    DATESTAMP=`date +%m-%d-%Y-%H%M`

    #backup and tar the database
    mysqldump -uMySQLUSERNAME -pMySQLPASSWORD -B DBNAME > /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql
    tar -czf /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql.tar.gz /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql
    rm -f /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql
    « Last Edit: December 14, 2002, 05:56:06 PM by David » Logged

    Omar Bazavilvazo
    YaBB SE Developer
    YaBB God
    *****
    Posts: 2153


    I never said I would stay to the end...

    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #5 on: December 14, 2002, 07:40:47 AM »
    Reply with quote

    Thanks!

    I tried it :)

    Manually, it worked (the script i created)

    Now let's wait for Cpanel to execute the cron job :)

    cool!

    ja ne!
    « Last Edit: December 14, 2002, 08:19:39 AM by Omar Bazavilvazo » Logged

    Greetings from México!
    http://omarbazavilvazo.com
    Mi foro Español-Japonés
    http://hablajapones.org
    http://hablajapones.org/index.php/japones/tutoriales/b16.php

    NO me manden IM para soporte o dudas
    ...Leo los foros como todos...
    Shindou Hikaru
    Honinbou
    YaBB Crony
    YaBB God
    *****
    Posts: 1358


    ICQ - 152652980mephidmann@emulation-inc.com WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #6 on: December 14, 2002, 09:24:23 AM »
    Reply with quote

    Quote from: David on December 14, 2002, 06:28:09 AMVery simple little script.  Replace the CAPS with the needed values.  For the paths you must use full paths, not relative.  In the end it creates the file timestamp-db.sql.gz.  You can rename the file if you wish but if you want the timestamp make sure you leave in $DATESTAMP.  You can run this from the command line if you make it executable or set it up to run via cron.

    #! /bin/sh

    DATESTAMP=`date +%m-%d-%Y-%H%M`

    #backup and tar bn_website database
    mysqldump -uMySQLUSERNAME -pMySQLPASSWORD -B DBNAME > /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql
    tar -czf /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql.tar.gz /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql
    rm -f /PATHTOBACKUPSTORAGE/$DATESTAMP-db.sql
    How cool! I set up the same thing for YaBB SE ;)
    Logged

    Please do not message me for support, use the support boards
    Amazon Wishlist | ThinkGeek Wishlist | My Blog
    dart
    Noobie
    *
    Posts: 1


    I'm a llama!

    Re:FAQ: HowTo Save/Restore the database data
    « Reply #7 on: January 04, 2003, 05:31:33 AM »
    Reply with quote

    yep..
    but how iam doing the installaion?
    when iam gave the name of my database(i didn't created it first, couse i dont know how to creat it)
    its giving me a problem:
    " CONNOT USE THE GIVEN DATABASE
    Logged
    mediman
    Support Team
    YaBB God
    *****
    Posts: 2858


    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #8 on: January 09, 2003, 03:23:05 AM »
    Reply with quote

    our db dump/restore/optimizer (restore in development), the old standalone was http://www.yabbse.org/community/attachments/maindb2.zip, will be added in the admin.menu! we are working now on gzip and bzip the output!

    mediman &  manju
    « Last Edit: March 20, 2003, 11:54:58 PM by mediman » Logged

    mainComm Dev Team
    Overseer
    Sr. Member
    ****
    Posts: 455


    Whats the best way to back/move up your database?
    « Reply #9 on: March 25, 2003, 03:03:35 PM »
    Reply with quote

    I'm moving hosts soon... current host is linux based so i have cpanel/phpmyadmin etc

    cpanel provides a dbase backup function.. but is phpmyadmin's export better than this?

    basically whats the best way to be sure i've downloaded a 'good' image of my database?

    and also for ease of re-rupping it on the new host (which has the same features available)

    of course I wont delete the 'old' one until i've got it running on the new host anyways...


    (ohh yeah... my dbase is currently around 250 meg )
    « Last Edit: March 25, 2003, 03:05:29 PM by Overseer » Logged

    I learned that from the G's, a G is an Overseer, the Overseer sees.
    More than you do 'cause he gets experienced - Snoop on Daz's OG

    Supreme exalted, universal leader, Descendent of the kings and queens, the Overseer
    The overlord, cream of the crop, creme de la creme - Gang Starr  Royalty
    [Unknown]
    Global Moderator
    YaBB God
    *****
    Posts: 7830


    ICQ - 179721867unknownbrackets@hotmail.com WWW
    Re:Whats the best way to back/move up your database?
    « Reply #10 on: March 25, 2003, 04:20:12 PM »
    Reply with quote

    Do you have shell access?  (on both preferably...)

    -[Unknown]
    Logged
    Overseer
    Sr. Member
    ****
    Posts: 455


    Re:Whats the best way to back/move up your database?
    « Reply #11 on: March 25, 2003, 04:27:41 PM »
    Reply with quote

    I definitely do where I am now... just checked and i will on the new host i'm looking at too (if i ask) ;D
    Logged

    I learned that from the G's, a G is an Overseer, the Overseer sees.
    More than you do 'cause he gets experienced - Snoop on Daz's OG

    Supreme exalted, universal leader, Descendent of the kings and queens, the Overseer
    The overlord, cream of the crop, creme de la creme - Gang Starr  Royalty
    David
    Destroyer Dave
    Global Moderator
    YaBB God
    *****
    Posts: 5761


    I'm not a llama!

    WWW
    Re:Whats the best way to back/move up your database?
    « Reply #12 on: March 25, 2003, 09:00:06 PM »
    Reply with quote

    Then use the mysqldump tool.  Things in CAPS are for you to fill in.

    On your current host, do this in a directory where it can be downloaded over the web.
    mysqldump -uUSER -pPASSWORD DBNAME > backup.sql
    gzip backup.sql


    On your new host.
    Make the new database
    wget http://www.yoursite.com/backup.sql.gz
    gunzip backup.sql
    mysql -uUSER -pPASSWORD DBNAME < backup.sql
    Logged

    Douglas
    aka The Bear
    Support Team
    YaBB God
    *****
    Posts: 1050


    Bears rule! Llamas rule too!

    WWW
    Re:Whats the best way to back/move up your database?
    « Reply #13 on: March 26, 2003, 01:03:26 AM »
    Reply with quote

    There should be a space between -u and USERNAME and -p and PASSWORD.  This is VERY important.  David, can you fix your post to reflect that?
    Logged

    Need help? Please SEARCH first.  No need for a bad attitude, we like helping positive minded people.
    ComeHit.us Short URL  redirection svcs with YSE powered forums, COMING SOON!
    Want to say thanks?  Check out http://comehit.us/?u=3
    David
    Destroyer Dave
    Global Moderator
    YaBB God
    *****
    Posts: 5761


    I'm not a llama!

    WWW
    Re:Whats the best way to back/move up your database?
    « Reply #14 on: March 26, 2003, 01:04:56 AM »
    Reply with quote

    Quote from: Prism329 on March 26, 2003, 01:03:26 AM
    There should be a space between -u and USERNAME and -p and PASSWORD.  This is VERY important.  David, can you fix your post to reflect that?
    I use it nightly with no space.
    « Last Edit: March 26, 2003, 01:05:52 AM by David » Logged

    Pages: [1] 2 3 Reply Ignore Print 
    YaBB SE Community  |  English User Help  |  FAQ  |  FAQ: HowTo Save/Restore the database data « previous - next »
     


    Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
    © 2001-2003, YaBB SE Dev Team. All Rights Reserved.
    SMF 2.1.4 © 2023, Simple Machines
    Valid XHTML 1.0! Valid CSS

    Page created in 0.046 seconds with 19 queries.