Yes, you can restore the config on the new device of the same type. But you should think about buying a 5506-X instead of the 5505. The 5505 is approaching EOL and is technologically outdated. This device should not be bought any more today.
Restoring the config will be slightly harder as the 5506 doesn't yet use the concept of switchports. That means that you have to convert the config before restoring it.