If you have to give the tank up there are a few things you can do. You could sell or trade the rock, you could put the rock in a closed container with water and pumps and a heater to maintain it, but of course this is like having a tank so that's not a good idea for you, or you could simply let the rock dry out. If and when you can get back into the tank you simply buy one small piece of live rock to put in the new tank with all the old and the old will eventually be colonized again. This means a long cycle but it works. Even dry rock is useful for the future.