You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the trash bin app is enabled (default), this setting defines the policy
5
+
Introduction
6
+
-------------
7
+
8
+
When deletion of a file or folder is requested, Nextcloud does not immediately delete
9
+
it by default. Instead it is moved into the trash bin to faciliate easy restoration.
10
+
11
+
Items in the trash bin are only permanently deleted if the owner manually uses the *Delete
12
+
permanently* button or administrative policy specifies the items should be automatically
13
+
(permanently) deleted.
14
+
15
+
Logged in accounts access their trash bin by selecting the the *Deleted files* section
16
+
from within the **Files** area of the Nextcloud Web interface. There any item still in
17
+
their trash bin can be restored, downloaded, or deleted permanently.
18
+
19
+
The experience, from the perspective of individual accounts, is covered in greater detail within
20
+
the `User Manual <https://docs.nextcloud.com/>`.
21
+
22
+
.. note:: If the *Versions* app is enabled, restoring a file also restores related file
23
+
versions.
24
+
25
+
.. warning:: When an item that has been shared is deleted then restored, it will no longer be
26
+
shared.
27
+
28
+
Policy Configuration
29
+
--------------------
30
+
31
+
The default retention policy for deleted items is:
32
+
33
+
- For all accounts, items will retained in the trash bin indefinitely unless a quota or maximum
34
+
trash bin size, that is applicable to the account, gets configured.
35
+
- If a account has a maximum trash bin size and exceeds it, the oldest items in their
36
+
trash bin are automatically (permanently) removed until the maximum trash bin size is no
37
+
longer exceeded.
38
+
- If an account has a quota configured and exceeds it it, the oldest items in their trash
39
+
bin are automatically (permanently) removed until the quota is no longer exceeded.
40
+
41
+
.. note:: There is no default maximum trash bin size and quotas are at the discretion of the
42
+
administration.
43
+
44
+
Hopefully it's becoming clearer that the default policy can be influenced by:
45
+
46
+
- Specifying a quota for an account.
47
+
- Configuring a maximum trash bin size (either globally or on an individual account; applicable to
48
+
accounts with or without quotas).
49
+
- Overriding the default retention policy by modifying the value of ``trashbin_retention_obligation``
50
+
in ``config/config.php`` (more on that now).
51
+
52
+
Available retention policy values are:
53
+
54
+
* ``auto, auto`` (i.e. the default)
55
+
- Keeps files and folders in the trash bin indefinitely.
56
+
- Automatically permanently deletes files and folders in accounts with a maximum trash bin size if
57
+
space is needed.
58
+
- Automatically permanently deletes files and folders in accounts with quotas if space is needed.
59
+
- Note: Files may not be deleted if space is not needed, such as if there is no applicable maximum
60
+
trash bin size or quota for an account.
61
+
* ``X, auto``
62
+
- Keeps files and folders in the trash bin for a minimum of ``X`` days
63
+
- Automatically permanently elete anytime if space needed (note: files may not be deleted if space is not needed)
64
+
* ``auto, D``
65
+
delete all files in the trash bin that are older than D days
66
+
automatically, delete other files anytime if space needed
67
+
* ``D1, D2``
68
+
keep files and folders in the trash bin for at least D1 days and
69
+
delete when exceeds D2 days (note: files will not be deleted automatically if space is needed)
70
+
* ``disabled``
71
+
trash bin auto clean disabled, files and folders will be kept forever
72
+
73
+
.. note:: The default policy is equivalent to ``'trashbin_retention_obligation' => 'auto',`` (which is
74
+
how it was formerly documented and is still also acceptable). It's presentation has been adjusted
75
+
to be consistent with other possible values (more on those in a moment).
76
+
77
+
78
+
79
+
- Retain items in the trash bin for a minimum of ``X`` days and, optionally, anytime if needed.
80
+
- Automatically (permanently) remove items after they have been in the trash bin for ``Y``
81
+
days and, optionally, anytime if needed or even never.
82
+
- Never remove files
83
+
84
+
- If a maximum trash bin size is configured (either globally or an individual account) and
85
+
an account still exceeds it after the time-based expiration has taken place, the oldest
86
+
items in their trash bin are automatically removed until the maximum trash bin size is no
87
+
longer exceeded.
88
+
- If a maximum trash bin size has **not** been configured, but an account has a quota
89
+
configured and has exceeded it (after the age based expiration), then the oldest items in
90
+
their trash bin are automatically removed until the quota is no longer exceeded.
91
+
92
+
- The global retention policy is set via the ``trashbin_retention_obligation`` parameter within ``config/config.php``.
93
+
- The maximum trash bin size is an optional parameter that can be set either globally or on a per account basis using the ``occ trashbin:size`` command.
94
+
- It is applicable to both accounts that have a quota and those that do not.
95
+
- It takes precedence over any specified quota.
96
+
- It permits the maximum trash bin size to be managed separately from account quotas.
97
+
- It permits an enable to specify a maximum trash bin size for accounts that do not have quotas.
98
+
99
+
Background Jobs
100
+
----------------
101
+
102
+
- expiration background jobs
103
+
104
+
105
+
- can manually trigger some activities directly via ``occ trashbin*`` commands
106
+
107
+
108
+
This functionality is provided by the *Deleted files* app (a.k.a. ``files_trashbin``).
109
+
This app is responsibility for providing the web interface for interacting with deleted
110
+
items as well
111
+
112
+
113
+
which is enabled by default.
114
+
115
+
116
+
By default, these files remain in the trash bin for 30 days.
117
+
To prevent an account from running out of disk space, the Deleted files app will not utilize more than 50% of the currently available free quota for deleted files. If the deleted files exceed this limit, the app deletes the oldest files until it gets below this limit. More information is available in the Deleted Files documentation.
118
+
119
+
120
+
is enabled (default), this setting defines the policy
6
121
for when files and folders in the trash bin will be permanently deleted.
7
122
8
123
.. note::
@@ -26,23 +141,6 @@ You may alter the default pattern in ``config.php``. The default setting is
26
141
27
142
'trashbin_retention_obligation' => 'auto',
28
143
29
-
Available values:
30
-
31
-
* ``auto``
32
-
default setting. keeps files and folders in the trash bin for 30 days
33
-
and automatically deletes anytime after that if space is needed (note:
34
-
files may not be deleted if space is not needed).
35
-
* ``D, auto``
36
-
keeps files and folders in the trash bin for D+ days, delete anytime if
37
-
space needed (note: files may not be deleted if space is not needed)
38
-
* ``auto, D``
39
-
delete all files in the trash bin that are older than D days
40
-
automatically, delete other files anytime if space needed
41
-
* ``D1, D2``
42
-
keep files and folders in the trash bin for at least D1 days and
43
-
delete when exceeds D2 days (note: files will not be deleted automatically if space is needed)
44
-
* ``disabled``
45
-
trash bin auto clean disabled, files and folders will be kept forever
0 commit comments