Bash Script to Read & Write on different directories

Hi,

root@server] df -h

121G 14G 101G 12% /home
147G 126G 14G 91% /backup

We having our site files and images are storing in

/backup/home/user/files/ through symbolic link created in /home directory pointing in /backup directory as following.

root@server] cd /home
root@server] ls -la
root@server] files --> /backup/home/user/files

Now you can see our /backup drive is almost full. Now we want to remove symoblic link from /home directory to store files in /home directory at /home/user/files/ as it has lot of free space it only 12% full to resolve issue for storing files.

But the problem is when we delete symbolic link from /home directory. Files can be stored in /home directory without any problem. But when site users wants to read files through site ... old files are in /backup drive and new files are in /home drive. How can we tell in our code from where to read which file reside on /backup and which on /home drive.

Is there any way around of this. We want to have a bash script to sense files which are in /backup and which are in /home drive. We want script to check files in both directories. Please help me to sort out this issue.

Cheers,

If you're using Apache, you can try to use "Alias" in you config file to point to the new directory.