Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to Bulk delete WHM accounts backups via SSH

Discussion in 'Data Protection' started by Joseph H, Mar 6, 2016.

  1. Joseph H

    Joseph H Registered

    Joined:
    Mar 6, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Tanzania
    cPanel Access Level:
    Root Administrator
    Hi guys, I have about 28 backups which were generated from the daily Backups configuration from withing WHM. I want to delete all the backups, how do i do that?

    #cd /backup/
    #root@server2 [/backup]# ls -al
    total 28
    drwx--x--x 7 root root 4096 Mar 6 03:11 ./
    drwxr-xr-x 19 root root 4096 Feb 29 23:52 ../
    drwx--x--x 4 root root 4096 Feb 28 02:00 2016-02-28/
    drwx--x--x 4 root root 4096 Mar 1 02:00 2016-03-01/
    drwx--x--x 4 root root 4096 Mar 3 02:00 2016-03-03/
    drwx--x--x 4 root root 4096 Mar 5 02:00 2016-03-05/
    drwx--x--x 4 root root 4096 Mar 6 02:00 2016-03-06/

    But navigating to "cd /backup/cpbackup/monthly" does not work. "No such directory"

    WHM 54.0

    Thanks
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    718
    Likes Received:
    122
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Hello,

    You would do

    Code:
    # rm -rf /backup/2016*
    That will delete all backups shown in your paste
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Joseph H

    Joseph H Registered

    Joined:
    Mar 6, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Tanzania
    cPanel Access Level:
    Root Administrator
    Thanks mate, It worked. ;)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,277
    Likes Received:
    1,846
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see the solution offered to you was helpful. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice