API to create a backup/copy of the SQLite Persistent Store, and replicate it on other devices running the same app?

I would like to be able to manually transfer over / replicate / duplicate the SQLite-based persistent store to different devices running the same app, from an originating "master" persistent store.

>>>>

1) What is the recommended procedure / API to be able to duplicate the data store to another device running the same app?


The options to create a backup file are:

a) I see there are three files that store the SQLite database: datamodel.sqlite, DataModel.sqlite-shm, DataModel.sqlite-wal.
Zip up the three files and replace the existing files on the another device running the app, programmatically using NSFileManager.

Are all three files necessary to create a pristine replica of the SQLite database?

b) Is there any API in the CoreData to be able to generate / serialize a single output backup file of the persistent store? And what would be the corresponding API to be able to import (replace existing store) from a backup file?


API to create a backup/copy of the SQLite Persistent Store, and replicate it on other devices running the same app?
 
 
Q