TODO: check if command line uses default options on export, last used options or ignore options not set on command line. Because default options by using Gramps user interface and Exporter enable "privacy filters"...

GRAMPS version 3.1.x et supérieure

Avec fichiers media

Assuming your database is called "My Family Tree", and you want the backup to include external media objects such as images and documents, the recommended method to create a backup is to use the gramps-pkg format:

In case of problems, you can add the format of the output to the above command. For a gramps package:

--format=gpkg

or

--format=gramps-pkg

Sans fichiers media

If you don't need to include the media objects in your backup, then you can make use of the gramps-xml format:

gramps -O "My Family Tree" -e backup.gramps

or

gramps --open="My Family Tree" --export=backup.gramps

This is equivalent to selecting the following menu options:

Family Trees -> Export -> "GRAMPS XML database" -> "Entire Database".

The Generate XML page has further information on what can be done with the .gramps files.

GRAMPS verson 3.0.x

Avec fichiers media

Assuming your database is called "My Family Tree", and you want the backup to include external media objects such as images and documents, the recommended method to create a backup is to use the gramps-pkg format:

The Generate XML page has further information on what can be done with the .gramps files.

GRAMPS version 2.2.x

Sans fichiers media

The gramps-xml data format will produce a backup of your data excluding any media objects, such as external images and documents. The following example shows how to create a gramps-xml file from a database called "MyFamilyTree.grdb":

gramps -O MyFamilyTree.grdb -o backup.gramps -f gramps-xml

Exportation Gedcom

GEDCOM export

Please note that GEDCOM is not recommended for backups since it is a lossy format.

But there are times you may need to export your data to GEDCOM. This command will attempt to export your database as a GEDCOM file: