[logo] How to Backup and Restore on Linux

Create a compressed archive of ".gnupg" folder, and keep it in a storage medium in a safe place.

>> Backup your GnuPG data

Follow these steps at your home directory.

  1. Create a compressed archive.
    $ tar cvzf gnupg-backup20040723.tar.gz .gnupg
    
    • Replace 20040723 with the date you make the backup file.
  2. Confirm the content of the archive.
    $ tar tvzf gnupg-backup20040723.tar.gz
    
  3. Copy the archive file to a storage medium, and keep it in a safe place.

>> Restore your GnuPG data

Follow these steps at your home directory.

  1. Copy the kept archive file to your home directory.
  2. Extract the backed up contents from the archive.
    $ tar xvzf gnupg-backup20040723.tar.gz