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 issue

Discussion in 'General Discussion' started by nks16june, Sep 18, 2012.

  1. nks16june

    nks16june Registered

    Joined:
    Sep 18, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Udaipur, Rajasthan, India
    cPanel Access Level:
    Root Administrator
    On My server i have set local backup daily, weekly and monthly. last night some one deleted a account from server. now since the daily backup was takes yesterday night it does not had the data there. weekly backup is too old. what can be done to avoid this state i had similar issue before also.

    i want to retain last 7 days data on server. so i have access to all of them i dont mind adding more disk.

    but this is a must. like in /backup we have folder like

    /backup/monday
    /backup/tuesday etc for all 7 days this can help many

    let me know if i can do that some how :(

    Thanks

    Nishant
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Nishant,

    In order to allow this type of solution, you'd want to setup a cron job to scp or rsync the daily backup folders to another server or to copy on the server itself to another location on a daily basis to create the monday, tuesday, etc. folders for the daily backup. It would be best to date the backup folders instead of naming them by the day of the week.

    This script is something you'd have to setup yourself, but it is possible to run a cron script to do this scp / rsync or copy after the backups run. Simply have the script check for this line in that day's cPanel backup log:

    Code:
    [cpbackup] Completed at
    You'd also need to check the date stamp on the log file in /usr/local/cpanel/logs/cpbackup to ensure you are checking for that line in the right log file. The cron could run about 6 hours after the backup is scheduled. If it doesn't work, you'd receive a notification due to the cron not showing a completed backup to copy.

    Again, this will need to be something you configure, but hopefully the above details get you going in the right direction.

    Thanks!
     
Loading...

Share This Page