Jump to content

Community

Adding a server disk space check and S3 Cloud files size che


Recommended Posts

Hello

I think it is very important to add a check for server free disk space and check also the files size from S3 Cloud before starting the transfering from S3 back to server.

If the available free disk space on the server is not enough for the files that coming from the S3 cloud back then the server will be full and the server will die.

Nothing will work with 0 free space and the user will be in a case that he will not be able to revert that task and the only solution will be to request from the data center extra hard disks to added on the server.

Until then the forum will be down ....

Doesn't seem hard to add that very useful info for the user when he will try to run that task and from a quick check i found:

https://www.php.net/manual/en/function.disk-free-space.php

For Linux hosts:

$df = round(disk_free_space("/") / 1024 / 1024 / 1024);
print("Free space: $df GB");

Or in your case it sounds like you're running on Windows so:

$df = round(disk_free_space("C:") / 1024 / 1024 / 1024);
print("Free space: $df GB");

 

Please add this asap as it is very important !

Link to post
Share on other sites
  • Management

This is one of those cases where you need to be sure you are aware of what you are doing when you are self-hosting. I do not believe our software should be in the business of helping you run your server. You should have the technical know how to check your S3 bucket size and your own server's disk space before starting a file storage move.

Keeping track of server disk space or S3 bucket size is not really up to our software - that is the job of the system administrator.

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy