I've just picked up a new client's server, he's running CentOS. The server hosts a web app. There are currently two discs on the server, a 120GB SSD disc and a 2TB HDD disc.

The original developer has placed the web app inside the SSD partition, this partition is being spammed by cache files being generated everytime a user uploads some content (images/videos).

I don't want to move the app over to the HDD drive at this time of year (1 week until christmas). So I want to symlink this cache directory on the SSD over to the HDD.

Let's say the cache folder resides in the following folder:

// This is inside the SSD partition

I want to symlink the cache folder over to the HDD partition so that the cache files are being stored on the HDD partition. Let's say the folder I want to move the files over to is below:


The server is very fragile IMO - No back-ups, the guys web app has been installed 3-4 times on the SSD disc (in different places), so I am taking a cautious approach to this. I don't want to cause myself a christmas headache!

Any advice on how to do this with CentOS would be appriciated!


Move everything from /home/app/var/cache to the new directory, then create the symlink :

$ mv /home/app/var/cache /mnt/new_cache_folder
$ ln -s /mnt/new_cache_folder /home/app/var/cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.