Changing the hostname

Rebuild preserves the database. If you still are paranoid, just make a backup and download that, it contains all users, posts, etc.