Results 1 to 8 of 8

Thread: Linux Command Line Help

  1. #1
    drizendohs is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    22

    Default Linux Command Line Help

    Hello,

    I have installed Sugar with the rPath appliance on an old box we had here at the office. Everything is working as it should, but I am a newbie when it comes to Linux.

    Can anyone offer a little hlep with the actual syntax I type at the bash to make a backup?

    For example, I want to make a backup and I have the commands to run a mysqldump at the command line. I can get to a command line in the rPath Linux box with Putty or I can get access to the physical terminal. Where do I go from there? I don't know the actual name of my database which is necessary for the backup to take place. How do I find that from the command line?

    Once I get the backup to happen with the command line mysqldump, how do I get a copy of the backup onto another machine?

    Is this the type of thing that the support license would give me if I bought Sugar Network?

    Thanks!

  2. #2
    nathanbthomas is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    46

    Default Re: Linux Command Line Help

    The database name is 'sugarcrm'. So, the dump of the db should look like this:

    cd ~/
    mysqldump sugarcrm > sugarcrm.sql

    That will move you to the root user's home directory and produce a file called sugarcrm.sql that is your backup dump.

    You can then get the dump off of the system by using scp, or secure copy. Putty should let you do that by browsing the filesystem to /root/ and you should see the sugarcrm.sql file for download.

    You may want to save the /usr/share/sugarcrm/config.php file as well just as a reference of your config.
    Nathan Thomas
    Sugar Appliance Maintainer

  3. #3
    florenceit is offline Sugar Community Member
    Join Date
    Apr 2005
    Posts
    123

    Default Re: Linux Command Line Help

    i also zip the sugar directory structure with my db dump, figure it can't hurt, and its not that large. I am pretty sure that last year sometime i restorted the working copy on another linux machine by restoring these two things and it worked fine.
    Florence I.T. - A community IT shop for Western MA, US

  4. #4
    drizendohs is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    22

    Default Re: Linux Command Line Help

    Awesome! This was exactly what I needed. Thanks so much.

    One other thing, won't this take a dump of the data AND structure?
    mysqldump sugarcrm > sugarcrm.sql

  5. #5
    nathanbthomas is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    46

    Default Re: Linux Command Line Help

    Yes, that should get everything. When I go to do a fresh install and import an existing sugar db (dumped the way we're talking about) this is what I do:


    mysql </root/db_setup.sql
    mysql sugarcrm < /root/sugarcrm.sql

    db_setup.sql is a file that looks like this:

    create database sugarcrm;
    grant all on sugarcrm.* to 'sugarcrm'@'localhost' identified by 'changeme' with grant option;
    Nathan Thomas
    Sugar Appliance Maintainer

  6. #6
    drizendohs is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    22

    Default Re: Linux Command Line Help

    Quote Originally Posted by nathanbthomas
    Yes, that should get everything. When I go to do a fresh install and import an existing sugar db (dumped the way we're talking about) this is what I do:


    mysql </root/db_setup.sql
    mysql sugarcrm < /root/sugarcrm.sql

    db_setup.sql is a file that looks like this:

    create database sugarcrm;
    grant all on sugarcrm.* to 'sugarcrm'@'localhost' identified by 'changeme' with grant option;
    Pefrect! This was exactly what I was looking for. You're the man Nathan.

    The db_setup.sql file, is this a file I create then load to the machine to run? Or is this a file i find online then transfer to the machine?

    Thanks again for your help.

  7. #7
    nathanbthomas is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    46

    Default Re: Linux Command Line Help

    It is just a file that you can create, or of course, you can just type it all in interactively using the mysql command if you would rather.

    HOWEVER- since this is an install from the rPath Appliance, there should actually be a copy of that file in /root/ on that machine since this is the script that is used to actually do the installation on the appliances.

    Nathan
    Nathan Thomas
    Sugar Appliance Maintainer

  8. #8
    drizendohs is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    22

    Default Re: Linux Command Line Help

    Yup, just checked and the file is in root. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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