GN Latest News

How can I delete EHCP Force backups from the control panel list?

There are currently 36 “Frequently Asked Questions”
Post Reply
Rob Swan
Site Admin
Posts: 70
Joined: Tue Oct 31, 2017 3:03 pm
Location: UK
Contact:

How can I delete EHCP Force backups from the control panel list?

Post by Rob Swan »

EHCP force does not appear to have an easy way to delete backup files from the CP, so it has to be done by hand from both the database and the server hard drive.

It can be a bit tricky as you probably won’t have the correct permissions to delete the files using WinSCP.

There are 2 folders on your server that may contain backup files, this is because it is possible to do domain only backups as well as full server backups and the two different backups are saved in different folders.

The chances are that you only have full server backups as I have not taken you through domain only backups, unless of course you have been making backups for individual domains on your own.

If you log into your Control panel, and go to Create Backup and then click on List Backups, you can see a full list of the backups.

Image

If the backup just shows a filename in the box then it will be located in the folder /var/backup/.

If the backup file is in another folder then the path to the file will listed in the filename box for example /var/www/new/backups/ghostnetwork.co.uk-backup-2018-02-28_16-29-59_264_337.tgz

So at this point it’s a good idea to make a list of the files we want to delete, for files in the /var/backup/ folder we need to delete both the .tgz file and the _STATUS file.

So if the filename is backup-2017-11-14_15-37-38 as the above we need to delete backup-2017-11-14_15-37-38.tgz and backup-2017-11-14_15-37-38_STATUS

For other folders is will be just the single file as listed.

If you’re still not sure you could log in using WinSCP and have a look at the filenames in the specific folders so in our example the /var/backup/ looks like this in WinSCP.

Image

The folder /var/www/new/backups/ looks like this in WinSCP.

Image

Ok so the list of files to delete in the above example looks like this.

/var/backup/backup-2017-11-14_15-37-38.tgz
/var/backup/backup-2017-11-14_15-37-38_STATUS
/var/backup/backup-2018-02-17_13-10-21.tgz
/var/backup/backup-2018-02-17_13-10-21_STATUS
/var/www/new/backups/ghostnetwork.co.uk-backup-2018-02-28_16-29-59_264_337.tgz

So once you have a list of the filenames as above including the paths (folder names of the files) Log onto your server using your PC and Putty.

The delete file command is sudo rm PATH/FILENAME so bearing in mind that your filenames will be different from mine this is the list of commands I need to use.

sudo sudo rm /var/backup/backup-2017-11-14_15-37-38.tgz
sudo sudo rm /var/backup/backup-2017-11-14_15-37-38_STATUS
sudo sudo rm /var/backup/backup-2018-02-17_13-10-21.tgz
sudo sudo rm /var/backup/backup-2018-02-17_13-10-21_STATUS
sudo sudo rm /var/www/new/backups/ghostnetwork.co.uk-backup-2018-02-28_16-29-59_264_337.tgz

Ok so let’s do this!

Image

When done close Putty (type exit)

If you really want to you can check the files have gone using WinSCP (you may need to refresh the view) but checking is not really necessary.

Ok next log onto PHPMyAdmin.

At the left of PHPMyAdmin click the + sign to expand the ehcp database.

Image

Next on the left again click on the backups table.

Image

You will now see in the main screen all the entries in the backups list, tick the boxes located next to the entries you want to delete, then click delete.

Image

PHPMyAdmin will ask you to confirm the deleting so in this click Yes.

Image

When you see the onscreen confirmation you can then log out of PHPMyAdmin.

Image

That’s it Job done, so if you check in your control panel the backups will be gone from the list.

Image
Post Reply