sentora / sentora-core

Sentora is a web hosting control panel written in PHP for *NIX
GNU General Public License v3.0
653 stars 444 forks source link

temp backup files not being deleted. #232

Closed TGates71 closed 8 years ago

TGates71 commented 8 years ago

http://forums.sentora.org/showthread.php?tid=2431&pid=14454#pid14454

jacobgelling commented 8 years ago

Looking at the post, it seems they are being deleted after 30 days but are just very large (likely storing a lot of files or large DBs).

user@s1:/etc/sentora/panel/etc/tmp$ ls -a
.           zadmin_Dec-14-2015_091214.zip  zadmin_Dec-30-2015_071257.zip
..          zadmin_Dec-17-2015_081209.zip  zadmin_Jan-05-2016_070110.zip
_delete_me  zadmin_Dec-22-2015_091218.zip  zadmin_Jan-05-2016_070138.zip
storage     zadmin_Dec-29-2015_071226.zip

^ none are older than 30 days from post.

I might be complelety wrong though, I will check this on my install to make sure!

TGates71 commented 8 years ago

Does it only make the temp files when manually using backup? I only have one zip in there from October 16, 2015 and that may have been copied over from when I switched from Windows to my new Ubuntu server.

TGates71 commented 8 years ago

Tested. It only makes a backup in the /tmp/ folder if you do a manual backup. You get the forbidden error because downloading of backups in that manner was disabled. The backup zip should be moved to the client's /backups/ folder where they can then download it using FTP which is more secure.

jacobgelling commented 8 years ago

Yes, that seems to be the problem.

The backups were stored in /tmp so they could be downloaded through the browser but the daemon never checks to delete them there.

If you want I'll make a pull request tomorrow with the /tmp backups removed (solving this issue) and users being able to download backups via a different method in the browser (solving the other issue).

On 7 Jan 2016, at 09:04 pm, TGates notifications@github.com wrote:

Does it only make the temp files when manually using backup? I only have one zip in there from October 16, 2015 and that may have been copied over from when I switched from Windows to my new Ubuntu server.

— Reply to this email directly or view it on GitHub.

TGates71 commented 8 years ago

Ok, need to have it make the backup in the user's domain /backups/ folder instead of placing it in the /tmp/ folder and that should resolve all. -You won't need to remove them from /tmp/ if they get made in the user's /backups/ folder.

jacobgelling commented 8 years ago

Okay, I'll create them inside the user's own backup folder :+1:

MBlagui commented 8 years ago

Backup should be reworked. A lot of issues. We should add a field to say backup in progress and that will be cleared either once completer or after 12 hours in case there is an issue. That way we avoid having 2 backup running same time. Closing this.