C5 Disk space usage
Permalink
I've just cleaned out one fairly small low-traffic site, reducing its disk footprint from 296MB to 88MB by deleting 'crap' which would be OK if it were crap I had created but it's not and this stuff gets backed up every night and then transmitted off-site every night for about TEN sites. I've not yet checked the other sites on the machine but I assume they're choc-a-block with cruft, too.
Before cleaning
296504kb total
After deleting all most most recent update
255948kb total
/files/tmp contained 156.2MB of cruft, tossed all of it
After emptying files/cache
86888 total
Difference = 296504kb - 86888kb = 209.6MB
I get the /updates directory, you may want to rollback although C5 should have the ability to delete old updates from the dash if your site's working fine.
What's the deal with the /files/tmp directory, why doesn't it get cleaned?
/files/cache is self-evident anyway and by comparison not so big.
Amazon AWS will charge me for all the bandwidth I use over a certain amount and chucking 200MB around for a small website that I don't need to after having BZipped all that up for backup is comical. Never mind for the other ten sites which I assume are just as bloated. It's costing people money - I doubt I'm alone in using hosting with bandwidth charges (AWS is good value though, I must say).
There's still a now-redundant 33MB /concrete directory too, as the /updates/xxxxx version is used instead.
Don't misconstrue me as hating C5, it's great, but this... THIS... is a real faux-pas.
Off to check the other sites now and more than likely write a cruft script for cron which I really shouldn't have to be doing.
Before cleaning
296504kb total
After deleting all most most recent update
255948kb total
/files/tmp contained 156.2MB of cruft, tossed all of it
After emptying files/cache
86888 total
Difference = 296504kb - 86888kb = 209.6MB
I get the /updates directory, you may want to rollback although C5 should have the ability to delete old updates from the dash if your site's working fine.
What's the deal with the /files/tmp directory, why doesn't it get cleaned?
/files/cache is self-evident anyway and by comparison not so big.
Amazon AWS will charge me for all the bandwidth I use over a certain amount and chucking 200MB around for a small website that I don't need to after having BZipped all that up for backup is comical. Never mind for the other ten sites which I assume are just as bloated. It's costing people money - I doubt I'm alone in using hosting with bandwidth charges (AWS is good value though, I must say).
There's still a now-redundant 33MB /concrete directory too, as the /updates/xxxxx version is used instead.
Don't misconstrue me as hating C5, it's great, but this... THIS... is a real faux-pas.
Off to check the other sites now and more than likely write a cruft script for cron which I really shouldn't have to be doing.
My backup policy is my backup policy, unless you know what my server setup
is and what other stuff runs on there? I know why I chose this method over
rsync, AWS backup and various other methods.
What about the files/tmp/ disk space not being cleaned, presumably growing
forever?
G
On 7 June 2012 15:43, concrete5 Community <discussions@concretecms.com>wrote:
is and what other stuff runs on there? I know why I chose this method over
rsync, AWS backup and various other methods.
What about the files/tmp/ disk space not being cleaned, presumably growing
forever?
G
On 7 June 2012 15:43, concrete5 Community <discussions@concretecms.com>wrote:
Why don't you just setup cron to clean up your tmp and cache directories?
I have this afternoon, my point is partly I shouldn't need to - if it keeps
growing and growing forever then it's a flaw without some explanation of
why it's right for it to do it.
G
On 7 June 2012 18:18, concrete5 Community <discussions@concretecms.com>wrote:
growing and growing forever then it's a flaw without some explanation of
why it's right for it to do it.
G
On 7 June 2012 18:18, concrete5 Community <discussions@concretecms.com>wrote:
I totally agree with you. I just recently did a complete backup/mirror of a site and was angered at all the bloat C5 creates over time. It keeps all updates, all versions of all files you have ever uploaded, and moreso, keeps all files in lots and lots of randomly numbered directories. As practical versioning is, in my opinion there is a lot of room for improvement because there are still people that still have limited server space and don’t want to sign up for an enterprise hosting plan (for the unlimited space and bandwidth) just for a simple website.
For anyone who may find it useful, here's the PHP script I use to clean the cruft out before running a nightly backup for offsite download (yes I know shelling to ls is lazy ;o):
Which is run before backups with a crontab line such as:
<?php $wwwbase = '/www'; // get www dir list $list = `ls $wwwbase`; $list = explode("\n", $list); foreach($list as $item) { $item = trim($item); if(empty($item)) { continue; } if(is_dir("$wwwbase/$item/files/tmp")) { `rm -rf $wwwbase/$item/files/tmp/*`; echo "Cleanup.php: Removed contents of $wwwbase/$item/files/tmp/\n"; } }
Viewing 15 lines of 16 lines. View entire code block.
Which is run before backups with a crontab line such as:
0 0 * * * /usr/bin/php /root/cleanup.php
On a typical site all you have to backup is anything in the root override folders, the /config folder and then stuff in the files folder(not the cache and tmp obviously), and the sql backup. It's typically 60MB at the most for me.
And you should be rsyncing anyway for incrementals which typically never even does anything but a few files and the sql backup which usually comes in around 6MB for me.
This really isn't a good way to back up your clients websites and is definitely wasting money.