Results 1 to 18 of 18
  1. #1
    Join Date
    Nov 2005
    Posts
    59

    Automatically backing up a Database?

    Well,

    Really not sure which forum this belongs in so just starting here and hopefully someone can direct me if this is the wrong place.

    My website is hosted through hostpc.com.
    It has phpMyAdmin which I can use to see my DB stuff.
    It has a link in the Direct Admin dashboard called Cronjobs but I don't know anything about them.
    It also has a link to view Installed Perl Modules so I guess Perl is there too.

    It also has some sort of Softaculous Auto Installer if that helps at all.

    I'm not a programmer so really don't know much about this stuff but can usually tinker with things as long as I get pointed in the right direction...


    Anyway, I'm looking for some way I can set something up to automatically backup my database(s). I've seen lots of things regarding bash scripts, cron jobs, etc but I honestly don't know if I can even do that.

    I can access my site via FTP but don't know if I can access some sort of bash prompt or use Putty or something like that.

    If anyone can offer any assistance, please let me know.

    Thanks!!!

  2. #2
    Join Date
    Jul 2002
    Location
    World Wide Web
    Posts
    2,347
    I suppose you do not have WHM access or cpanel, right?
    NetDynamics LLC - One-stop Solution for Hosting Needs
    We love Backups! Backup storage for your server backups

  3. #3
    Join Date
    Nov 2005
    Posts
    59
    Quote Originally Posted by Dr_Michael View Post
    I suppose you do not have WHM access or cpanel, right?
    I think they offer DirectAdmin or cPanel but when I signed up eons ago I chose DirectAdmin. I don't know what the difference is or if that's something they can change me over to the other system...

  4. #4
    Join Date
    Jul 2002
    Location
    World Wide Web
    Posts
    2,347
    cPanel offers a good backup option. You can download your database and your files with just one click!
    NetDynamics LLC - One-stop Solution for Hosting Needs
    We love Backups! Backup storage for your server backups

  5. #5
    Join Date
    Apr 2005
    Location
    Holland
    Posts
    124
    DirectAdmin should also have option 'Backup' in which you can choose what should be backed-up (e-mail, website, database).

  6. #6
    Join Date
    Nov 2005
    Posts
    59
    Yes, DA has a backup option, but I have to log in and do it. I'm looking for something I can schedule somehow so I dont' have to do it every day. HostPC had an outage last week due to a HDD failure and they only back up weekly for shared accounts so I lost some stuff. I just want to make sure that doesn't happen again by making my own backups.

  7. #7
    Join Date
    Apr 2005
    Location
    Holland
    Posts
    124
    Well...

    DirectAdmin knows three access levels:
    - Admin
    - Reseller
    - User

    You most probably have user level. Only Admin and Resellers can automate (cronjob) backups of the users, but user level does not have this option (as you said, you have to log in and start it manually).

    So, try asking your hosting provider to set this option for you ;-)

  8. #8
    Join Date
    Feb 2012
    Posts
    231
    Add the following command to your CRON and you are all set to go:
    Code:
    mysqldump ---user [user name] ---password=[password] [database name] > [dump file]
    WEBUZO - Single User Control Panel for your VPS/Cloud/Server (CentOS/Ubuntu)
    Install NGINX, Apache, MySQL, LAMP, LEMP, PHP, Java and 310+ popular scripts by a CLICK
    Email Server, Database Management, Domain Management, FTP Management, CSF, CRON

  9. #9
    Join Date
    Nov 2005
    Posts
    59
    Quote Originally Posted by valley View Post
    Add the following command to your CRON and you are all set to go:
    Code:
    mysqldump ---user [user name] ---password=[password] [database name] > [dump file]
    That was going to be my next question. I just need to figure out if the mysqldump command is available to me and what folder it might be in. Unless it's always there and I can not worry about a path at all. hmm.

  10. #10
    Join Date
    Jul 2002
    Location
    World Wide Web
    Posts
    2,347
    Two more options:

    1. You can ask your host if they can schedule an automatic backup for you or if they sell an extra backup option such as automatic remote backup.
    2. You can buy a script such as cpremote or whmeasybackup to automate backups. But both need cpanel if I recall it right.
    NetDynamics LLC - One-stop Solution for Hosting Needs
    We love Backups! Backup storage for your server backups

  11. #11
    Join Date
    Nov 2005
    Posts
    59
    So if I change to a host that offers cPanel, does that make it easier for me to do my own automated backups? I'm looking to possibly change hosts after all this and most of them have cPanel as their preferred setup.

  12. #12
    Join Date
    Jul 2002
    Location
    World Wide Web
    Posts
    2,347
    Quote Originally Posted by kelemvor33 View Post
    So if I change to a host that offers cPanel, does that make it easier for me to do my own automated backups? I'm looking to possibly change hosts after all this and most of them have cPanel as their preferred setup.
    Absolutely yes.
    NetDynamics LLC - One-stop Solution for Hosting Needs
    We love Backups! Backup storage for your server backups

  13. #13
    Join Date
    May 2013
    Posts
    294
    cpanel is easier to manage
    Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months.Sancte Michael Archangele, defende nos in proelio, contra nequitiam et insidias diaboli esto praesidium. Imperet illi Deus, supplices deprecamur: tuque, Princeps militiae coelestis, Satanam aliosque spiritus malignos, qui ad perditionem animarum pervagantur in mundo, divina virtute, in infernum detrude. Amen

  14. #14
    Join Date
    Nov 2005
    Posts
    59
    I'm checking to see if they can change me over to cPanel. If not I may just look info moving to a new host.

  15. #15
    Join Date
    Nov 2005
    Posts
    59
    Quote Originally Posted by valley View Post
    Add the following command to your CRON and you are all set to go:
    Code:
    mysqldump ---user [user name] ---password=[password] [database name] > [dump file]

    Keep getting an error when I try to run it.

    mysqldump: Got error: 1045: Access denied for user 'kelemvor'@'localhost' (using password: YES) when trying to connect

    I've tried all the username/password combinations I have for phpyAdmin, the actual DB User, etc.

    Any ideas?

  16. #16
    Join Date
    Feb 2012
    Posts
    231
    Did you try flushing the privileges ?
    WEBUZO - Single User Control Panel for your VPS/Cloud/Server (CentOS/Ubuntu)
    Install NGINX, Apache, MySQL, LAMP, LEMP, PHP, Java and 310+ popular scripts by a CLICK
    Email Server, Database Management, Domain Management, FTP Management, CSF, CRON

  17. #17
    Join Date
    Nov 2005
    Posts
    59
    Quote Originally Posted by valley View Post
    Did you try flushing the privileges ?
    Don't know what that means, so nope.

  18. #18
    Join Date
    Feb 2004
    Location
    Toronto
    Posts
    2,308
    Use the login/password as the one your script is using. You can find it usually in the config file of the script.

    Quote Originally Posted by kelemvor33 View Post
    Keep getting an error when I try to run it.

    mysqldump: Got error: 1045: Access denied for user 'kelemvor'@'localhost' (using password: YES) when trying to connect

    I've tried all the username/password combinations I have for phpyAdmin, the actual DB User, etc.

    Any ideas?
    VimHost >> 30 Days Backup | cPanel + LiteSpeed + JetBackup | DMCA FREE!
    20 Years in business ~ Premium Hosting in Toronto, Canada ~ 151 Front Street (Canadian owned and operated)

Similar Threads

  1. I need some help backing up / restoring my database
    By iulia in forum Hosting Security and Technology
    Replies: 11
    Last Post: 12-05-2009, 08:30 AM
  2. backing up database
    By FreshFroot in forum Programming Discussion
    Replies: 9
    Last Post: 10-20-2009, 03:28 AM
  3. Backing up database data
    By pergesu in forum Hosting Security and Technology
    Replies: 2
    Last Post: 10-25-2005, 02:39 PM
  4. Backing up a MySQL Database
    By GameStudioD in forum Programming Discussion
    Replies: 9
    Last Post: 09-08-2004, 04:51 PM
  5. backing up a database woes
    By aqi32 in forum Web Hosting Lounge
    Replies: 7
    Last Post: 04-06-2004, 05:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •