0

Background:

We are using PHP CacheLite. In order to have a human readable path to cache files cache_{hash}_{hash}, there is a symbolic link that is more descriptive of the cache contents.

We deployed a new server and rather than warming cache via database queries, we decided to copy local cache directories/files/symlinks.

We had 10's of millions of files and symlinks which made rsync impossible We used scp with some success, but it seems to have created actual files in place of symlinks. We ended up with duplicate files with different names, rather than a file and corresponding symlink.

I created a bash script to replace the files with symlinks locally after scp. But I've noticed via df that the disk utilization is growing rather than shrinking. I would think that a symlink would take less space than a file. Is there a way to reclaim the space?

The command used to replace file with symlink

ln -sf nameofpermanentfile nameofsymlinkwhichreplacesfile

0 Answers0