Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Simple Backup Script

Discussion in 'Data Protection' started by furquan, Jul 18, 2017.

Tags:
  1. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    461
    Likes Received:
    3
    Trophy Points:
    168
    Hello Everyone,

    My apologies, if this is the wrong forum to post in :(
    ===================================

    I am basically looking for a backup script made using 'rsync'.

    I basically need it to copy folders between 2 servers. I am basically moving contents from a live
    server to a new server.

    a) The script should be able to copy my desired folder
    b) The script should mail me once has successfully finished


    Can somebody please assist me with such a script. Although i have tried to create one, but i am not sure how
    correct it is.

    It goes like this :-

    Please let me know if the above is correct or if it needs some rectification.

    Thank you for your time everyone !
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    461
    Likes Received:
    3
    Trophy Points:
    168
    Hello Michael,

    I am so very sorry, But since i am novice in scripting, I really dint get much there.

    Can you please review my script posted above and let me know if all is correct in it and can i go ahead'and
    use it without worry.

    Appreciate your time.

    Thank you,
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It looks correct, but I recommend running the "rsync" command manually first to make sure it works as intended before enabling the script as part of a cron job.

    Thank you.
     
Loading...

Share This Page