Project

General

Profile

Feature #3748

Add manual archive/ directory cleaning option

Added by Yannick Warnier almost 8 years ago. Updated almost 8 years ago.

Status:
Feature implemented
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
25/07/2011
Due date:
% Done:

70%

Estimated time:
1.00 h
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
5

Description

For the shared hosting installation, it is impossible or difficult to setup a cron process, and sometimes space is missing due to the massive use of the archive/ directory for temporary files.

Develop a script that removes all contents from the archive/ directory, except .htaccess, through PHP commands (unlink and rmmdir - there are wrapper functions for these in the Chamilo libraries) to avoid portability issues for Windows servers.

Place a link in the "Portal" block in main/admin/index.php which leads to a new dedicated page:
$ArchiveDirCleanup = "Archive directory cleanup";
$ArchiveDirCleanupDescr = "Chamilo keeps a copy of most of the temporary files it generates (for backups, exports, copies, etc) into its archive/ directory. After a while, this can add up to a very large amount of disk space being used for nothing. Click the button below to clean your archive directory up. This operation should be automated by a cron process, but if this is not possible, you can come to this page regularly to remove all temporary files from the directory.";
$ArchiveDirCleanupProceedButton = "Proceed with cleanup";
$ArchiveDirCleanupSucceeded = "The archive/ directory cleanup has been executed successfully.";
$ArchiveDirCleanupFailed = "For some reason, the archive/ directory could not be cleaned up. Please clean it up by manually connecting to the server and deleting the contents of the chamilo/archive/ directory, except the .htaccess file.";

The new file, main/admin/archive_cleanup.php has to be authorized for admins only (api_protect_admin_script()) and be accessible only on the root portal (in case of multi-urls).

Upon clicking the button, the action is executed immediately, the user is sent back to main/admin/index.php and the confirmation (or error) message appears on top of the page.

History

#1

Updated by Julio Montoya almost 8 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Julio Montoya)
  • % Done changed from 0 to 70
#2

Updated by Yannick Warnier almost 8 years ago

No I didn't add them. Let me know if you do.

#3

Updated by Julio Montoya almost 8 years ago

Lang terms added only in english in http://translate.chamilo.org

#4

Updated by Yannick Warnier almost 8 years ago

  • Status changed from Needs testing to Bug resolved

Tried and approved/

#5

Updated by Yannick Warnier almost 8 years ago

  • Status changed from Bug resolved to Feature implemented

Also available in: Atom PDF