Writes a compacted copy of the Realm to the given destination as defined by the targetConfiguration. The resulting file can be used for a number of purposes:
Backup of a local realm.
Backup of a synchronized realm, but all local changes must be uploaded first.
Convert a local realm to a partition-based realm.
Convert a synchronized (partition-based or flexible) realm to a local realm.
Encryption can be configured for the target Realm independently from the current Realm.
The destination file cannot already exist.
configuration that defines what type of backup to make and where to write it by using Configuration.path.