Question

How to reduce snapshot size

I am doing snapshots recently to backup my data. But their size is growing. Even when i do the cleanup, the snapshot size remains the same as it was before. Few days ago because of my fault, my script filled all avaliable 20 gb space, i deleted al those files, so i have 7 gb free now but myand so snapshots are now 20 gb sized (and their creation time is 20 minutes!).

I think the snapshot size may be growing because of ‘rm -rf’ may only mark data as ‘deleted’ but do not ‘annulate’ disk space and DO snapshot burner copies that as well. IDK how linux file deletion happens, correct me if i’m wrong.

I think the easiest way to fix it is to create new droplet and copy everything to it. But please help if you encounted that problem and know a better way to fixed.

My snapshots

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Ok, so I spoke to the support team and found out that although you’re not using the “empty” space on the droplet it gets snapshotted as well. The file size is not compressed. So if you’re running a 20 gb droplet, the unused space gets added to the snapshot. I think it’s better to switch to alternative backup methods. You don’t want to end up with more than a dozen snapshots weighting at 19 gb’s each in the end.

I’m having the same issue. My latest snapshot is huge compared to the one just created a couple of days ago. 18.14 GB vs 2.65 GB. I’m running a basic LEMP setup with WordPress. Looking at my “/” directory as root with du -sh / it’s only showing 2.1G. Where are all these huge files?

Are you sure you’re not just using that space even though you deleted the files? Files that are still being used by programs will stick around when deleted until those programs stop using them. They contribute to filesystem size that way.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel