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.

Remote backups with user ftp access

Discussion in 'General Discussion' started by HH-Steven, Mar 16, 2007.

  1. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I think i might be asking a little too much here but if you dont ask you dont get.

    Im currently looking at remote backups for all hosting accounts and wondering if theres a solution for the following:

    Backups run on all servers at a preset time and are date and time stamped (similar to how a full cpanel backup appears)
    Backups are then ftp'd (or other method) to remote server.

    Now, i know thats fairly straightforward but heres the tricky part:

    Daily backups:

    2 are stored on the remote server at all times with the oldest (3 days) being removed every day (hope that makes sense)

    Weekly & Monthly backups:

    1 of each is stored on the remote server at all times with it being replaced each week/month by the latest one.

    Again, not too tricky, im assuming the above can be done.

    Now the hard bit.

    Id like the users to be able to login via ftp to the remote server and download there backups so the first thing that comes to my head would be a folder structure similar to below:

    Remote Server:


    - Backup Folder

    -- Client-1-Backups
    -- Daily
    -- Monthly
    -- Weekly

    -- Client-2-Backups
    -- Daily
    -- Monthly
    -- Weekly

    And so on.........

    Im ok with setting up ftp access for each user myself via cpanel on the remote server but is there any solution to get the backups saved like the structure above?

    Im also open to any suggestions or alternatives.

    Thanks.
     
  2. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    This can be easily achived with a few custom shell scripts and some configurations. I've done it for multiple clients where I configure select databases or full cpanel backups to be remotely saved to a separate server.

    On the separate server they have a login to FTP and jailed SSH to retrieve the backup files.
    I've set it so they're kept for 2-3 days previous then rotated.

    PM me if you need some help setting this up
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I am not sure if this what you are looking for, but a cPanel forums user by the name beehave wrote a good script at: http://forums.cpanel.net/showthread.php?t=58096
     
  4. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Works and close but it only does half of what i need really.

    Ive got it making the backups and ftp'ing them off to a remote server but only to one folder within a cpanel account (below public_html) for example:

    /home/username/backupfolder/

    The backups are also only stored as username.tar.gz and not timestamped.

    Ive slightly deviated on the ideal solution so what i really want now is:

    Backups to be ftp'd to a folder below the /home/ directory, reason for this is because i have a secondary hard drive on the remote server im wanting to use solely for backups, for example:

    root@remoteserver [~]# /backups/server1/
    root@remoteserver [~]# /backups/server2/

    And so on...... im sure you get the idea.

    So im basically left with 2 issues to fix:

    1, how to ftp to below the /home/ directory? specifically connect to the secondary hard drive at "root@remoteserver [~]# /backups/"

    2, How to have all backups timestamped?

    Ideally id like both of the above to work but i could manage without number 1.

    Number 2 is essential though.

    Thanks.
     
  5. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    As I said you need a custom solution....
     
Loading...

Share This Page