These forums are read-only!
Slice getting too big for cloning to a smaller slice
  • Hi all,

    I have a 2G slice and my database is about 3-4G in size (on disk that is). I have DB backups that account for another 3-4G (zipped) and maybe another couple Gigs of Rails/Bdrb log files so all in all, I should be coming in under 10G of data on disk that I 'care about'. But my slice shows up as 22GB on a df -h. As a result if I want to create a new slice that's a mirror of my PROD slice, I can't do it with a 256MB or even a 512MB slice - I need to go with a 1GB slice.

    Where do you folks look to clear up old files - be they log files or mysql stuff or anything else? My PROD slice is pretty straightforward - Rails 2.0.2 + MySQL 5 + Nginx. I want to know if there are any 'usual suspects' in terms of files that have been getting accumulated and could use cleaning up. This slice is about 10 months old so I am sure there's a lot of cruft that can be cleaned up - I am looking for advice or pointers on how to go about doing this.

    Thanks in advance!
  • What distro are you running? If you have been running the distro for some time you are bound to have hundreds of megs (if not gigs) of old downloaded updates. There is no use in keeping them around.

    Also look in /var/log to see if any old log files could be cleaned up. SQL especially.

    Other than that use "du -h" at the root of the file system playing with the max-depth switch to control your output. It will show you space hogging folders.

    To delete in arch:
    pacman -Scc

    Debian/Ubuntu:
    apt-cache clean

    Fedora, etc: google is your friend.
  • I am on Ubuntu Hardy, thanks for all your suggestions. I'll poke around and see what I can get rid of
    Thanks