Welcome, Guest. Please Login or Register.
November 23, 2017, 12:19:47 AM
Home Help Search Login Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  FAQ  |  Topic: 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 39521 times)
andrea
Global Moderator
YaBB God
*****
Posts: 4400


Peace on Earth


WWW
FAQ: HowTo Save/Restore the database data
« on: December 14, 2002, 01: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, 12: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, 01: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, 01: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, 01: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, 01: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.

    Code: [Select]
    #! /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, 12: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, 02: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, 03: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



    WWW
    Re:FAQ: HowTo Save/Restore the database data
    « Reply #6 on: December 14, 2002, 04:24:23 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.

    Code: [Select]
    #! /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, 12: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 08, 2003, 10:23:05 PM »
    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, 06: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, 10:03:35 AM »
    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, 10:05:29 AM 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



    WWW
    Re:Whats the best way to back/move up your database?
    « Reply #10 on: March 25, 2003, 11:20:12 AM »
    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, 11:27:41 AM »
    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, 04: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.
    Code: [Select]
    mysqldump -uUSER -pPASSWORD DBNAME > backup.sql
    gzip backup.sql

    On your new host.
    Code: [Select]
    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 25, 2003, 08:03:26 PM »
    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 25, 2003, 08:04:56 PM »
    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?
    I use it nightly with no space.
    « Last Edit: March 25, 2003, 08:05:52 PM by David » Logged

    Pages: [1] 2 3 Reply Ignore Print 
    YaBB SE Community  |  English User Help  |  FAQ  |  Topic: 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.0.12 | SMF © 2016, Simple Machines
    Valid XHTML 1.0! Valid CSS!
    Page created in 0.715 seconds with 19 queries.