exp:trashpurge
Permanently delete all objects in the trash (dry run unless --apply).
Script bin/php/trashpurge.php, code in kernel/private/classes/commands/trashpurge.php. Run it from the installation root, as the user the web server runs as:
./console exp:trashpurge --help
php bin/php/trashpurge.php --helpHelp text
Empty Exponential trash.
Permanently deletes all objects in the trash.
Without --apply nothing is deleted: the script counts and lists what it would purge. --dry-run
means the same as no flag; --apply together with --dry-run is a usage error (exit 2). The cronjob
part trashpurge purges as before.
./bin/php/trashpurge.php
./bin/php/trashpurge.php --applyOptions
| Option | Value | Help |
|---|---|---|
--apply | Purge the objects (the default is a dry run that lists them and deletes nothing) | |
--dry-run | The default: count and list what would be purged, change nothing | |
--iteration-sleep | required | Amount of seconds to sleep between each iteration when performing a purge operation, can be a float. Default is one second. |
--iteration-limit | required | Amount of items to remove in each iteration when performing a purge operation. Default is 100. |
--memory-monitoring | If set, memory usage will be logged in var/log/trashpurge.log. | |
--trashed-days | required | If set, only objects that has been trashed for at least the specified amount of days will be purged. |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Related
Generated by ./console exp:help:examples from bin/php/trashpurge.php, kernel/private/classes/commands/trashpurge.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.