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 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:
    275
    Likes Received:
    31
    Trophy Points:
    28
    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
     
  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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page