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 problem (urgent)

Discussion in 'General Discussion' started by erkkis, Nov 16, 2005.

  1. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    I am having problems with my backups. The server crashed a day ago, now the server has a new HDD with new op system and cpanel/whm installed on it. I managed to get the last backup files from the old disk as well. As all sources of information told me, I copied the backup files to the new disc, to directory /backup. So, the files are like /backup/cpbackup/daily/username and so on.

    But the problem is that WHM doesn't recognize that I have those files there, and I have no opportunity to recover them through WHM. What should I do?

    Thank you!
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I assume you've also gone to WHM >> Backup >> Configure Backup and set the backup destination as /backup?
     
  3. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I have.
     
  4. ISNScott

    ISNScott Member

    Joined:
    Jul 16, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I assume you mean you have copied all the data off the slave drive -> the new one.

    Make sure you copy /var/cpanel
     
  5. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Yes, the old disk is currently mounted as /mnt/old and the data there was in /mnt/old/BACKUPID directory. And all the data was copied to /backup.

    Yes, the /var/cpanel directory is also copied. For example, under /var/cpanel/users I see all the users I had on my old disk.
     
  6. ISNScott

    ISNScott Member

    Joined:
    Jul 16, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Then it should display in WHM.

    Can you test creating an account and make sure its writing ok. However the accounts should list once you copy /var/cpanel
     
  7. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I take it that you're going to WHM >> Backup >> Restore Backups, selecting Daily, Weekly or Monthly and then not getting the users listed?

    Since you have your backups backed-up on another drive/partition, the contents of /backup would be expendable for the time being.

    To check that restoring from backups works at all, try the following:

    1. Enable backups in WHM
    2. Delete the contents of /backup
    3. Run /scripts/cpbackup
    4. Check if anything then exists in /backup (not that it will be of any use).
    5. Go to WHM >> Backup >> Restore Backups, select Daily, Weekly or Monthly and see if you get any users listed.
    6. Copy a specific user's backup from the other drive/partition to /backup/relevantdirectory (overwriting the recently created but useless backup)
    7. Check that that user is still listed in WHM >> Backup >> Restore Backups and try and restore from the backup.

    You might also want to check things such as the permissions and ownership of the contents of /backup - a permissions mismatch could certainly make WHM not be able to see the backups.
     
  8. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I tried to create a new account. It worked fine and now it's the only account I see under "accounts". But the backup system problem is still the same.
     
  9. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Well, but I don't get the users listed neither in "accounts" or "backup" section. :(
     
  10. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Add an account first and then try to restore it.
     
  11. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Now I did so.
    The result is that the new account doesn't start generating the backups and under backups the error message is

    "Sorry, there are no backups located at /backup/cpbackup! "
     
  12. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Also tried to change the permissions. But still the same.
     
  13. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Btw,

    3. Run /scripts/cpbackup

    This return a white page, which immediately stops loading (Done).
     
  14. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
  15. erkkis

    erkkis Member

    Joined:
    Nov 16, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I found out an interesting issue!

    The test account backup included both a directory and a .tar.gz file of that same directory. And I made a fake .tar.gz file and then WHM happily showed the new file as well in "restore" section. Very interesting. But the old disk backups are all just directories, no .tar.gz files. What should I do?
     
  16. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    Are the permissions and owner correct? I have moved backups from server to server before and did a restore as files with fewer problems that cpmove - so they should show up if permissions are correct. In fact, if you create another directory in the cpbackup directory it should even show up. It does in mine.
     
Loading...

Share This Page