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.

Backup on secondary hard drive and then on NAS ?

Discussion in 'Data Protection' started by TapanB, Aug 2, 2011.

  1. TapanB

    TapanB Active Member

    Joined:
    Nov 29, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have both secondary hard drive and NAS backup. I want to take uncompressed backups on secondary hard drive and when the cpbackup has completed i want to compress the backups on secondary hard drive and the archive which is created should be copied to NAS backup.

    How to achieve this ?

    Thanks.
     
  2. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    have you searched the forums yet? This has been discussed in depth many times over the past few years already
     
  3. TapanB

    TapanB Active Member

    Joined:
    Nov 29, 2004
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    What i did is set cpanel to take backup on my secondary hard drive (without compression) and then I created a script with the following code:

    tarname=`date +"%d_%B_%Y"`
    tar pzcvf /backup.tgz /secondary/cpbackup/daily
    mv /backup.tgz /mnt/nas/backups/"$tarname.tgz"

    And setup a cron job at a opposite time of cpbackup to run this script:

    0 23 * * * /donasbackup

    Seems to be doing what I wanted to do.

    Thanks.
     
Loading...

Share This Page