docs: basic example for a Recycle Bin function

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-01-02 18:51:45 +01:00
parent 53864fd8c1
commit 20706e45b0
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
9 changed files with 41 additions and 2 deletions

View file

@ -108,7 +108,7 @@ While the SFTPGo container is in graceful shutdown mode waiting for the last con
If no connections are active or `SFTPGO_GRACE_TIME=0` (default value if unset) the container will shutdown immediately.
:warning: The default docker grace time is 10 seconds, so if your SFTPGO_GRACE_TIME is larger than the docker grace time, then any `docker stop some-sftpgo` command will terminate your container once the docker grace time has passed. To ensure that the full SFTPGO_GRACE_TIME can be used, you either need to send a SIGINT or SIGTERM signal because only those 2 signals will trigger a graceful SFTPGo shutdown. Those signals can be sent using one of these commands: `docker kill --signal=SIGINT some-sftpgo` or `docker kill --signal=SIGTERM some-sftpgo`.
:warning: The default docker grace time is 10 seconds, so if your SFTPGO_GRACE_TIME is larger than the docker grace time, then any `docker stop some-sftpgo` command will terminate your container once the docker grace time has passed. To ensure that the full SFTPGO_GRACE_TIME can be used, you can send a SIGINT or SIGTERM signal. Those signals can be sent using one of these commands: `docker kill --signal=SIGINT some-sftpgo` or `docker kill --signal=SIGTERM some-sftpgo`.
Alternatively you can increase the default docker grace time to a value larger than your SFTPGO_GRACE_TIME. The default docker grace time can either be specified at creation/run time using `--stop-timeout <value>` or you can simply add `--time <value>` to the docker stop command like in this 60 seconds example `docker stop --time 60 some-sftpgo`.
### Where to Store Data

View file

@ -81,7 +81,7 @@ Done! Create a new user and check that the defined directories are automatically
Let's see how you can receive an email notification after each upload and, optionally, the uploaded file as well.
From the WebAdmin expand the `Event Manager` section, select `Event actions` and add a new action.
Create an action named `upload notification`, with the settings you can see in the following screen.
Create an action named `upload notification` with the settings you can see in the following screen.
![Upload notification action](./img/upload-notification.png)
@ -94,3 +94,42 @@ You can also filters events based on protocol, user and group name, filepath she
As actions, select `upload notification`.
Done! Try uploading a new file and you will receive the configured email notification.
## Recycle Bin
Let's see how we can configure a Recycle Bin style function where files are not deleted strait away, but instead moved to a separate folder.
To easily apply the Recycle Bin to multiple users we will create a virtual folder and a group, this way all users who belong to the group will have a Recycle Bin.
Create a virtual folder named `recycle` with the settings you can see in the following screen.
![Recycle folder](./img/recycle-folder.png)
Create a group named `recycle` with the settings you can see in the following screen.
![Recycle group](./img/recycle-group.png)
Make your users members of the `recycle` group.
From the WebAdmin expand the `Event Manager` section, select `Event actions` and add a new action.
Create an action named `move to recycle` with the settings you can see in the following screen.
![Recycle move action](./img/recycle-move-action.png)
Add another action, named `create move folder`, to create the parent directory for the move destination.
![Recycle create move folder action](./img/recycle-move-folder-action.png)
Now select `Event rules` and create a rule named `Recycle rule`, select `Filesystem events` as trigger, `pre-delete` as filesystem event and exclude the `/recycle` path.
![Recycle rule](./img/recycle-rule.png)
![Recycle rule exclude path](./img/recycle-rule-path.png)
As actions, select `create move folder` and `move to recycle` and for both set `Execute sync`.
![Recycle rule actions](./img/recycle-rule-actions.png)
Done! Try deleting a file, it will be moved to the Recycle Bin.
You can also add a scheduled event rule to automatically delete files older than a configurable time from the `recycle` folder.

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB