MonetDB auto-backup mechanic problem












1















I'm trying to set up mechanism that will automatically create database backup.

The idea is to create a script that will be executed by crontab. Seems easy but I'm struggling with the following problems:




  • I cannot use msqldump, because it needs password input from the user;

  • I've tried physical copy, but after removing database or dbfarm and restoring them, monetdb and monetdbd couldn't start "restored" database and dbfarm;


Can I bypass above problems and/or are there other solutions?










share|improve this question














bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    presumably you've seen the MonetDB page about doing a physical file copy? monetdb.org/Documentation/UserGuide/FastDumpRestore

    – Max Vernon
    Jun 24 '15 at 3:26
















1















I'm trying to set up mechanism that will automatically create database backup.

The idea is to create a script that will be executed by crontab. Seems easy but I'm struggling with the following problems:




  • I cannot use msqldump, because it needs password input from the user;

  • I've tried physical copy, but after removing database or dbfarm and restoring them, monetdb and monetdbd couldn't start "restored" database and dbfarm;


Can I bypass above problems and/or are there other solutions?










share|improve this question














bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    presumably you've seen the MonetDB page about doing a physical file copy? monetdb.org/Documentation/UserGuide/FastDumpRestore

    – Max Vernon
    Jun 24 '15 at 3:26














1












1








1


1






I'm trying to set up mechanism that will automatically create database backup.

The idea is to create a script that will be executed by crontab. Seems easy but I'm struggling with the following problems:




  • I cannot use msqldump, because it needs password input from the user;

  • I've tried physical copy, but after removing database or dbfarm and restoring them, monetdb and monetdbd couldn't start "restored" database and dbfarm;


Can I bypass above problems and/or are there other solutions?










share|improve this question














I'm trying to set up mechanism that will automatically create database backup.

The idea is to create a script that will be executed by crontab. Seems easy but I'm struggling with the following problems:




  • I cannot use msqldump, because it needs password input from the user;

  • I've tried physical copy, but after removing database or dbfarm and restoring them, monetdb and monetdbd couldn't start "restored" database and dbfarm;


Can I bypass above problems and/or are there other solutions?







linux backup restore






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 18 '15 at 12:58









yamnyyamny

1064




1064





bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    presumably you've seen the MonetDB page about doing a physical file copy? monetdb.org/Documentation/UserGuide/FastDumpRestore

    – Max Vernon
    Jun 24 '15 at 3:26














  • 1





    presumably you've seen the MonetDB page about doing a physical file copy? monetdb.org/Documentation/UserGuide/FastDumpRestore

    – Max Vernon
    Jun 24 '15 at 3:26








1




1





presumably you've seen the MonetDB page about doing a physical file copy? monetdb.org/Documentation/UserGuide/FastDumpRestore

– Max Vernon
Jun 24 '15 at 3:26





presumably you've seen the MonetDB page about doing a physical file copy? monetdb.org/Documentation/UserGuide/FastDumpRestore

– Max Vernon
Jun 24 '15 at 3:26










1 Answer
1






active

oldest

votes


















0
















  1. Create .monetdb file in the home directory as below:



    cat << EOF > $HOME/.monetdb
    user=monetdb
    password=monetdb
    EOF


  2. Replace the above content with your monetdb username and password.


  3. Change the file permission to prevent other user from reading it [optional]



  4. Run:



    export msqldump=$HOME/.monetdb
    echo 'export msqldump=$HOME/.monetdb' >> $HOME/.bashrc



After making above changes, I have ran the below mysqldump command, it doesn't ask user to input password.



mysqldump -d[database-name] > [sql_dump_backup_path]


Source :How to setup mysqldump without password in cronjob






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f101806%2fmonetdb-auto-backup-mechanic-problem%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0
















    1. Create .monetdb file in the home directory as below:



      cat << EOF > $HOME/.monetdb
      user=monetdb
      password=monetdb
      EOF


    2. Replace the above content with your monetdb username and password.


    3. Change the file permission to prevent other user from reading it [optional]



    4. Run:



      export msqldump=$HOME/.monetdb
      echo 'export msqldump=$HOME/.monetdb' >> $HOME/.bashrc



    After making above changes, I have ran the below mysqldump command, it doesn't ask user to input password.



    mysqldump -d[database-name] > [sql_dump_backup_path]


    Source :How to setup mysqldump without password in cronjob






    share|improve this answer






























      0
















      1. Create .monetdb file in the home directory as below:



        cat << EOF > $HOME/.monetdb
        user=monetdb
        password=monetdb
        EOF


      2. Replace the above content with your monetdb username and password.


      3. Change the file permission to prevent other user from reading it [optional]



      4. Run:



        export msqldump=$HOME/.monetdb
        echo 'export msqldump=$HOME/.monetdb' >> $HOME/.bashrc



      After making above changes, I have ran the below mysqldump command, it doesn't ask user to input password.



      mysqldump -d[database-name] > [sql_dump_backup_path]


      Source :How to setup mysqldump without password in cronjob






      share|improve this answer




























        0












        0








        0









        1. Create .monetdb file in the home directory as below:



          cat << EOF > $HOME/.monetdb
          user=monetdb
          password=monetdb
          EOF


        2. Replace the above content with your monetdb username and password.


        3. Change the file permission to prevent other user from reading it [optional]



        4. Run:



          export msqldump=$HOME/.monetdb
          echo 'export msqldump=$HOME/.monetdb' >> $HOME/.bashrc



        After making above changes, I have ran the below mysqldump command, it doesn't ask user to input password.



        mysqldump -d[database-name] > [sql_dump_backup_path]


        Source :How to setup mysqldump without password in cronjob






        share|improve this answer

















        1. Create .monetdb file in the home directory as below:



          cat << EOF > $HOME/.monetdb
          user=monetdb
          password=monetdb
          EOF


        2. Replace the above content with your monetdb username and password.


        3. Change the file permission to prevent other user from reading it [optional]



        4. Run:



          export msqldump=$HOME/.monetdb
          echo 'export msqldump=$HOME/.monetdb' >> $HOME/.bashrc



        After making above changes, I have ran the below mysqldump command, it doesn't ask user to input password.



        mysqldump -d[database-name] > [sql_dump_backup_path]


        Source :How to setup mysqldump without password in cronjob







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 10 '16 at 10:18









        Paul White

        52.2k14279452




        52.2k14279452










        answered Jul 6 '15 at 21:10









        BrendaBrenda

        11




        11






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f101806%2fmonetdb-auto-backup-mechanic-problem%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL Server 17 - Attemping to backup to remote NAS but Access is denied

            Always On Availability groups resolving state after failover - Remote harden of transaction...

            Restoring from pg_dump with foreign key constraints