How to Remove Backups — System Console

I will preface this by saying, this is only meant for those with a basic understanding of shell commands or how to use the system console.  If you want to remove backups, that’s one thing.  Don’t go all willy nilly into your account and start removing stuff since you “think” it shouldn’t be there.  Last thing you need to do is remove /var just because you didn’t think it should be there.  FYI, /var is where your databases and many of your logs are…so don’t remove it.

First things first, log into your system console:  carvertown.com/how-to-access-the-system-console

To refresh some basic commands:

  • cd (changes directory)
  • cd .. (go up a directory)
  • ls (lists the directory)
  • rm (removes the file).

Now when you first log into the system console it will take you to the /root directory, which is the root users directory.  So you’ll see something like this after you log in:

[root@server ~]

You need to be in your root, or /  so you want to move there.

cd /

now it will show

[root@server /]

Now when you run the ls command it will list your directories inside /  something to this affect

console_ls

You’ll want to navigate to your backup folder.  Which should be /backup/cpbackup if you are using Legacy Backup or just /backup if you are using Backup.  Check out this article if you are unsure which one you are using: carvertown.com/how-to-configure-backup-settings

So type this:

cd /backup/cpbackup

ls

Now you’ll list the cpbackup directory

console_cpbackup

You have the choice of how you want to go about removing your backups.  You can remove the entire directory (not recommended), empty the directory of all files and directories (not recommended), empty the directory of all files (better), or go into the backup directory and remove the backup files individually (best way).

To just remove the directory, while in /backup/cpbackup you’d type this command (another warning, never ever do this unless you are absolutely sure you want to remove it, you will delete it and won’t be able to get it back):

rm -rf daily
or
rm -rf weekly
or
rm -rf monthly

Personally I don’t like that way, I’ve seen some people delete something on accident they didn’t mean to. Another way would be to empty the directory, similar to the last ones, but the backup directory will still be there.

rm -r daily/*
or
rm -r weekly/*
or
rm -r monthly/*

Or you can just empty the files that are in the backup and leave the directories.

rm daily/*
or
rm weekly/*
or
rm monthly/*

Those are all ways I don’t recommend. It’s better if you go into the backup directory and find the backup you want to delete. It will be listed as username.tar.gz  The command you’d run, after changing into the backup directory, would be this:

rm username.tar.gz

 console_rm

Once again, a very strong warning, be very very careful using these commands in the system console.  In all though, that is how to remove backups.

Posted in Archived Posts and tagged .