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.

How To Locate Backups Files via SSH and Delete

Discussion in 'General Discussion' started by dnow, Dec 12, 2013.

  1. dnow

    dnow Member

    Joined:
    Dec 12, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I recently ran into a storage issue with cpanel storing too many of my backups which should have been deleted. After contacting godaddy I was able to gain access to my site again but am unable to login to cpanel because I am out of diskspace (100%).
    I have access to ssh as admin however I do not remember the name of my backup files in which need to be deleted. I have tried deleting some backups from my /backup/cpbackup using the b/u name in which I had downloaded to my physical hard drive but it doesn't seem to be working. Can somebody let me know how to find the actual name of the file so I can delete them? Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Backup archives are stored in the following locations by default:

    For legacy backups:

    /backup/cpbackup

    For the new backup system:

    /backup/$date

    Are you not finding the archives in these directories?

    Thank you.
     
  3. dnow

    dnow Member

    Joined:
    Dec 12, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The issue I am having is that I don't know what the name of the backup is so when I run
    rm -iv "backup name" it doesn't work. I have tried using the name in which the backup was downloaded but it doesn't work when trying in both directories (see below).
    rm -iv backup-10.27.2013_10-32-11_dnow.tar.gz
    rm: cannot remove `backup-10.27.2013_10-32-11_dnow.tar.gz': No such file or directory

    Is there a way that I can search my backup folder for the proper name of the backup/backups to delete?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. dnow

    dnow Member

    Joined:
    Dec 12, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    /backup/cpbackup
    total 12
    drwx--x--x 3 root root 4096 Nov 8 23:53 ./
    drwx--x--x 3 root root 4096 Mar 6 2013 ../
    drwx--x--x 5 root root 4096 Dec 11 01:07 monthly/

    /backup/$date
    total 12
    drwx--x--x 3 root root 4096 Mar 6 2013 ./
    dr-xr-xr-x 26 root root 4096 Dec 12 07:08 ../
    drwx--x--x 3 root root 4096 Nov 8 23:53 cpbackup/

    That is what displays in putty. Are those the file names? Doesn't look like what was displayed in file manager. I probably did have 12 backups in there but not all are displayed.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You have to browse to the sub-directories. EX:

    Code:
    cd /backup/cpbackup/monthly
    ls -al
    Please ensure you are careful when removing files. It appears you are not familiar with the command line environment, so removing files should be done with extreme caution. You may even want to consider consulting with a qualified system administrator.

    Thank you.
     
  7. dnow

    dnow Member

    Joined:
    Dec 12, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Found, deleted and now in cpanel. Thank you very much for the assistance!
     
  8. dnow

    dnow Member

    Joined:
    Dec 12, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    For the record the issue I had was the my backups were being installed in my home dir. That is why I was unable to locate them. Thanks again.
     
Loading...

Share This Page