The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

bsh, and commands to backup.

Discussion in 'Data Protection' started by Bidi, Dec 31, 2014.

  1. Bidi

    Bidi Well-Known Member

    Joined:
    Oct 3, 2012
    Messages:
    51
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Romania, Transilvania
    cPanel Access Level:
    DataCenter Provider
    Hy guys, in the last days i had a massive problem with my mysql i had to restore 200 databases from backups witch cpanel software makes them but was a big mass so i start to war on some time of backup to make it on external server.

    If someone can help me i what to make a bash file so i can setup in cron to run backup to mysql folder and the accounts backup.

    I use scp -r -l 10240 -P 22 mysql root@1.1.1.1:/home

    But my problems is it propmts to add the password so if i make a bash and use sompting like ./backup is not going to work cuz the password. Is there any ways to add in bash file the password and not to propmpt the password any more ?

    I use -l 10240 to limit the speed otherwise all the websites will not work any more because is using all the speed of the server, and i think if i make the same using cpanel backup ftp option will be the same eats all the bandwich.

    If somenone got good ideas with the bash command or some new ways is allways welcome and i will be more then happy.
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    You will have to setup SSH access key on your server so that your scripts will not propmts for the backup. Some backup plugin are using SSH key for the external backup.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you considered using the native backup functionality available in Web Host Manager? You can choose to backup databases on a per-account basis or to backup the entire MySQL directory.

    Thank you.
     

Share This Page