You can, but you loose a lot of functionality. The restoration process will create a new configuration.php file for you, but some things will be gone (like cache settings, site meta description, ...). Everything which has to do with paths, database configuration, site name, site email address and "from" name can be configured through the restoration script.
Please note that moving your configuration.php file outside of the web root does not protect your site in any way. If there is a vulnerable extension on your site which allows direct file inclusion, file dumping or allows uploading of executable code a hacker can use it to gain access to your configuration.php. It will stall him for 30 seconds, but that's all. IMHO it is a bad idea to move the file for "security" reasons, because there is no added security whatsoever using this approach.
Of course, it's your site and you get to choose what you want to do with it :)
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!