Difference between revisions of "How to make a backup"

From Gramps
Jump to: navigation, search
m (check this todo)
(Gramps version 3.3 and later)
 
(18 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
{{languages|How to make a backup}}
 
{{languages|How to make a backup}}
  
'''How to make a backup''' of your Gramps genealogy database.
+
'''How to make a backup''' of your Gramps genealogy Family Tree database.
 
+
{{Out of date|'''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.3 and later==
 
==Gramps version 3.3 and later==
  
Simply select "Make Backup..." from the "Family Trees" menu item.
+
From the menu simply select {{man menu|Family Trees > Make Backup..."}}
  
[[Image:MakeBackup-GrampsXMLBackup-40.png|left|thumb|250px|Fig. 1. Backup Options]]
+
The {{man label|Gramps XML Backup}} window will appear.
  
{{-}}
+
[[Image:MakeBackup-GrampsXMLBackup-40.png|right|thumb|450px|Fig. 1. Backup Options]]
  
You can enter the path where the backup should be stored. You can enter a file name.
+
You can enter the path where the backup should be stored manually or using the path selector button.  
  
You can either choose to include the media or not.  
+
You can enter a file name manually or use the automatically generated file name.
  
Note that this is just a regular XML export, except that no data is filtered out. You can import these as usual with any exported file.
+
You can either choose to '''Include'''(default) or ''Exclude'' the {{man label|Media:}}.  
  
You can also define the pattern for the backup filename by setting the ''paths.quick-backup-filename'' in the ~/.gramps/gramps34/gramps.ini key file like the following:
+
{{man note|Note|This is just a regular XML export, except that no data is filtered out. You can import these as usual with any exported file.}}
  
 +
===Advanced settings===
 +
 +
You can also define the pattern for the backup filename by setting the ''paths.quick-backup-filename'' in the ~/.gramps/gramps42/gramps.ini key file like the following:
 +
{{-}}
 
  [paths]
 
  [paths]
 
  quick-backup-filename='%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s'
 
  quick-backup-filename='%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s'
  
You can use any of the following keywords in the pattern: year, month, day, hour, minutes, seconds, filename, extension.
+
You can use any of the following keywords in the pattern:
 +
*filename
 +
*year
 +
*month
 +
*day
 +
*hour
 +
*minutes
 +
*seconds
 +
*extension :
 +
**'''.gpkg'''(default) if you include media.
 +
**''.gramps'' if you exclude media.
  
For version 3.3 you should use the appropriate ~/.gramps/gramps33/gramps.ini key file.
+
Use the appropriate ~/.gramps/gramps{XX}/gramps.ini key file.
 +
*Gramps version 4.2 :
 +
~/.gramps/gramps42/gramps.ini
 +
 
 +
==Gramps version 3.1.x to 3.2.x ==
  
==Gramps version 3.1.x and later==
 
 
===With media files===
 
===With media files===
 
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:
 
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:
Line 40: Line 55:
 
  gramps --open="My Family Tree" --export=backup.gpkg
 
  gramps --open="My Family Tree" --export=backup.gpkg
  
This is equivalent to selecting the following menu options:
+
This is equivalent to selecting the following menu options: {{man menu|Family Trees -> Export -> "GRAMPS package (portable XML)" -> "Entire Database"}}
 
+
Family Trees -> Export -> "GRAMPS package (portable XML)" -> "Entire Database".
+
  
 
In case of problems, you can add the format of the output to the above command. For a gramps package:
 
In case of problems, you can add the format of the output to the above command. For a gramps package:
Line 50: Line 63:
  
 
===Without media files===
 
===Without media files===
If you don't need to include the media objects in your backup, then you can make use of the [[GRAMPS XML|gramps-xml]] format:
+
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  
 
  gramps -O "My Family Tree" -e backup.gramps  
Line 58: Line 71:
 
  gramps --open="My Family Tree" --export=backup.gramps  
 
  gramps --open="My Family Tree" --export=backup.gramps  
  
This is equivalent to selecting the following menu options:
+
This is equivalent to selecting the following menu options {{man menu|Family Trees -> Export -> "Gramps XML database" -> "Entire Database"}}
 
+
Family Trees -> Export -> "GRAMPS XML database" -> "Entire Database".
+
  
 
The [[Generate XML]] page has further information on what can be done with the .gramps files.
 
The [[Generate XML]] page has further information on what can be done with the .gramps files.
Line 70: Line 81:
 
  gramps --open="My Family Tree" --output=backup.gpkg --format=gramps-pkg
 
  gramps --open="My Family Tree" --output=backup.gpkg --format=gramps-pkg
  
This is equivalent to selecting the following menu options:
+
This is equivalent to selecting the following menu options {{man menu|Family Trees -> Export -> "GRAMPS package (portable XML)" -> "Entire Database"}}
 
+
Family Trees -> Export -> "GRAMPS package (portable XML)" -> "Entire Database".
+
  
 
===Without media files===
 
===Without media files===
If you don't need to include the media objects in your backup, then you can make use of the [[GRAMPS XML|gramps-xml]] format:
+
If you don't need to include the media objects in your backup, then you can make use of the [[Gramps XML]] format:
  
 
  gramps --open="My Family Tree" --output=backup.gramps --format=gramps-xml
 
  gramps --open="My Family Tree" --output=backup.gramps --format=gramps-xml
  
This is equivalent to selecting the following menu options:
+
This is equivalent to selecting the following menu options {{man menu|Family Trees -> Export -> "Gramps XML database" -> "Entire Database"}}
 
+
Family Trees -> Export -> "GRAMPS XML database" -> "Entire Database".
+
  
 
The [[Generate XML]] page has further information on what can be done with the .gramps files.
 
The [[Generate XML]] page has further information on what can be done with the .gramps files.
Line 88: Line 95:
  
 
===Without media files===
 
===Without media files===
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":
+
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 "<code>MyFamilyTree.grdb</code>":
  
 
  gramps -O MyFamilyTree.grdb -o backup.gramps -f gramps-xml
 
  gramps -O MyFamilyTree.grdb -o backup.gramps -f gramps-xml
Line 95: Line 102:
 
{{man warn|GEDCOM export|Please note that GEDCOM is not recommended for backups since it is a [[Gramps_and_GEDCOM|lossy format]].}}
 
{{man warn|GEDCOM export|Please note that GEDCOM is not recommended for backups since it is a [[Gramps_and_GEDCOM|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:
+
There are times you may need to export your data to GEDCOM.  This command will attempt to export your database as a GEDCOM file:
  
 
  gramps --open="My Family Tree" --output=export.ged --format=gedcom
 
  gramps --open="My Family Tree" --output=export.ged --format=gedcom
  
 
[[Category:How do I...|Backup]]
 
[[Category:How do I...|Backup]]

Latest revision as of 21:53, 25 August 2015

Gnome-important.png Special copyright notice: All edits to this page need to be under two different copyright licenses:

These licenses allow the Gramps project to maximally use this wiki manual as free content in future Gramps versions. If you do not agree with this dual license, then do not edit this page. You may only link to other pages within the wiki which fall only under the GFDL license via external links (using the syntax: [http://www.gramps-project.org/...]), not via internal links.
Also, only use the known conventions


How to make a backup of your Gramps genealogy Family Tree database.

Gramps version 3.3 and later

From the menu simply select Family Trees > Make Backup..."

The Gramps XML Backup window will appear.

Fig. 1. Backup Options

You can enter the path where the backup should be stored manually or using the path selector button.

You can enter a file name manually or use the automatically generated file name.

You can either choose to Include(default) or Exclude the Media:.

Gramps-notes.png
Note

This is just a regular XML export, except that no data is filtered out. You can import these as usual with any exported file.

Advanced settings

You can also define the pattern for the backup filename by setting the paths.quick-backup-filename in the ~/.gramps/gramps42/gramps.ini key file like the following:

[paths]
quick-backup-filename='%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s'

You can use any of the following keywords in the pattern:

  • filename
  • year
  • month
  • day
  • hour
  • minutes
  • seconds
  • extension :
    • .gpkg(default) if you include media.
    • .gramps if you exclude media.

Use the appropriate ~/.gramps/gramps{XX}/gramps.ini key file.

  • Gramps version 4.2 :
~/.gramps/gramps42/gramps.ini

Gramps version 3.1.x to 3.2.x

With media files

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:

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

or

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

This is equivalent to selecting the following menu options: Family Trees -> Export -> "GRAMPS package (portable XML)" -> "Entire Database"

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

Without media files

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

With media files

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:

gramps --open="My Family Tree" --output=backup.gpkg --format=gramps-pkg

This is equivalent to selecting the following menu options Family Trees -> Export -> "GRAMPS package (portable XML)" -> "Entire Database"

Without media files

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

gramps --open="My Family Tree" --output=backup.gramps --format=gramps-xml

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 version 2.2.x

Without media files

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

GEDCOM export

Gnome-important.png
GEDCOM export

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

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

gramps --open="My Family Tree" --output=export.ged --format=gedcom