Does Plesk have a Recycle Bin in File Manager?

Follow

Comments

17 comments

  • Avatar
    Holger Schramm

    Be careful, because the trashbin has no retention time for deleting the files automatically. you have to this by hand.

    1
    Comment actions Permalink
  • Avatar
    Michael Neubert

    The recycle bin seems to be turned on by default now:

    So in case you suddenly run out of disk space on your server, this could be one "new" reason.

    0
    Comment actions Permalink
  • Avatar
    Glenn

    This feature really needs a retention time feature otherwise the server will just fill up.

    If I disable the trashbin in Panel.ini, will the files within trash also be removed?

    Thx
    G

    0
    Comment actions Permalink
  • Avatar
    Holger Schramm (Edited )

    Glenn: No. You have to delete the files manually.

    0
    Comment actions Permalink
  • Avatar
    Glenn

    Any plans to add plesk admin capability to limit how long files are kept in trashbin?

     

    0
    Comment actions Permalink
  • Avatar
    Julian Bonpland Mignaquy (Edited )

    Hi Glenn, the feature you are requesting is already in progress with ID PPP-54200. It will be most likely implemented in version 18.0.39. You can monitor this website https://docs.plesk.com/release-notes/obsidian/change-log/.

    As a workaround, this could be resolved with a cron job.

    1. Log into Plesk

    2. Go to Tools & Settings > Scheduled Tasks > Add Task

    3. In the Command field, put the full path to the script to be executed.
      # find /var/www/vhosts/* -maxdepth 1 -type d -name ".trash" | xargs -i find {} -type f -mtime +1 | xargs -i rm {}
    4. In the Run field, set the the task execution time.
    5. In the System user field, leave user as root or choose another system user to run the task
    1
    Comment actions Permalink
  • Avatar
    Glenn

    Awesome. Thanks for the update Julian.

     

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen

    Very annoying feature. Customer's account gets disabled because of overusage. So we re-enable it, then the customer's account goes offline again.
    Reason? Files are in the stupid thrash can.

    Please make this a default disabled feature instead. So people who want to use it, can enable this crap instead of being enabled by default. We now have to make changes to over 200 servers by hand because of this "great" feature! Very, very annoying.

    You increase pricing, because of these kind of new features, however the whole Plesk experience is going down. So disable this crrap feature by default.

    0
    Comment actions Permalink
  • Avatar
    Michel vd Lingen

    So we had our first server customer who crashed his server (Oops... Something went wrong) thanks to this trash can function!
    He deleted a big amount of GB's, then he restored files from a back-up and the server was 100% full and crashed.

    Excellent function.... Not!

    Next time when you add such "fantastic" functions, make them disabled by default! Let the provider (or customer) decide if he wants to enable it! And not force it enabled instead! We are already paying top price for Plesk, but we do not want this nonsense. Thank you kindly.

    0
    Comment actions Permalink
  • Avatar
    Federico Cappellotto

    I'm trying to set up the task but if i run it, it doesn't delete ".trash" folders.

    What am i doing wrong?

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello @Federico Cappelotto,

    The command is not supposed to delete the ".trash" folders themselves as the Trash Bin feature relies on their existence. Instead, it does remove everything within them.

    0
    Comment actions Permalink
  • Avatar
    Lucas Knapp

    As usual, documentation does not seem to be up-to-date, since the changelog from 13 October 2021 (Plesk Obsidian 18.0.39) clearly mentions that "Plesk users can now configure the automatic deletion of files in the Recycle Bin by date and/or by time. By default, the automatic deletion is enabled."

    It's really disappointing that we customers have to dig through the changelog when it comes down to the customization of the panel.ini!

     

    And because users probably will end up on this site via Google search, I'm gonna copypaste what's written here (https://docs.plesk.com/release-notes/obsidian/change-log/), although it should be an employee's job, to be honest.

    Plesk users can now configure the automatic deletion of files in the Recycle Bin by date and/or by time. By default, the automatic deletion is enabled.

    The Plesk administrator can manage this feature and change its default settings by using the following panel.ini options:

    [fileManager]
    ; Shows and hides the automatic deletion feature in the interface. The default value is `true`.	
    trash.rotation.enabled 
    ; The file size limit in megabytes. When the limit is exceeded, Plesk will skip the Recycle Bin and automatically delete new files. The default value is 5 GB.
    trash.rotation.bySize.limit 
    ; The number of days the Recycle Bin stores files. Plesk automatically deletes files older than the specified number. The default value is `30`.
    trash.rotation.byDate.limit 
    

    I have not tested it yet, though, I never noticed this feature before until we had the same problem that is mentioned in the comments - lack of space due to moving files rather than deleting.

    0
    Comment actions Permalink
  • Avatar
    Lucas Knapp

    Did some testing, overall it seems to work, but the quoted changelog description is a little bit confusing.

    Values for trash.rotation.bySize.limit are default only in MB, panel.ini does not seem to parse any unit declarations. At first I thought the parameter was not used at all, because with a limit of 1024MB it still asked whether the to-be-deleted file should be moved to the trash folder and does so. But one can see the set value in the "rotation settings" if the trash folder is opened via File Manager. Still unclear how the mechanism works in detail, because when I delete an 1.5GB file and select recycle bin, it won't get deleted instantly. So I deleted yet another file, which I didn't expect to end up in ".trash" due to the set limit already being exceeded, but no - both files are still available in the ".trash" dir. Running "plesk sbin statistics" for that domain does not help either.

     

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello, @Lucas Knapp

    The options you've mentioned are applied to the trash rotation and not the immediate action upon the file removal. Trash directory is rotated with a daily maintenance task, yet you can force it:
    # plesk daily -f RotateTrash

    0
    Comment actions Permalink
  • Avatar
    Jan Bludau (Edited )

    Please add an autodelete Feature.

    Something Like:
    [fileManager]
    trash.autodelete = 1
    trash.delete_after_days = 30

    If it's working from "Julian Bonpland Mignaquy" posted here.

    find /var/www/vhosts/* -maxdepth 1 -type d -name ".trash" | xargs -i find {} -type f -mtime +1 | xargs -i rm {}

    0
    Comment actions Permalink
  • Avatar
    Stefan Yakubov

    Hello, @Jan Bludau

    You can file a feature request here:

    https://plesk.uservoice.com/forums/184549-feature-suggestions/

    1
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request