Commands‎ > ‎

Export

Exports a backup directory for technical support.

    hb export -c backupdir


The export command creates a tar file of a backup directory for HB technical support to use to solve customer problems.

Advantages of export:
  • rekeys a copy of the database, so your backup key in key.conf is not disclosed
  • an optional passphrase secures your exported backup data, even on publicly-accessible storage
  • changes pathnames to numbers
  • includes log files
  • clears backup keys stored in the database
  • clears all file and block hashes
  • clears destination credentials
  • creates a "dummy" dest.conf, with only the names of your destinations
  • export's tar file is compressed and about half the size tar would create
The backup is exported as backupdir/export.tar.  An export does not contain file contents and has pathnames changed to numbers, but it does include permissions, timestamps, and other information that the Unix ls -l command might display, and HB metadata such as block numbers, backup times and statistics.  Deleted pathnames are changed to ?? when possible, though this is not perfect and deleted pathnames containing spaces may be partially visible in the export.

IMPORTANT: an export is not a backup of your database and cannot be used to restore data!  Critical information has been stripped out for privacy.

To see what is included in a HashBackup export, use tar -tf export.tar, or use tar -xf export.tar to expand the tar file as in this example:

$ hb init -c hb

HashBackup build #2286 Copyright 2009-2019 HashBackup, LLC

Backup directory: /hb

Permissions set for owner access only

Created key file /hb/key.conf

Key file set to read-only

Setting include/exclude defaults: /hb/inex.conf


VERY IMPORTANT: your backup is encrypted and can only be accessed with

the encryption key, stored in the file:


    /hb/key.conf


You MUST make copies of this file and store them in secure locations,

separate from your computer and backup data.  If your hard drive fails, 

you will need this key to restore your files.  If you have setup remote

destinations in dest.conf, that file should be copied too.

        

Backup directory initialized


$ hb backup -c hb test

HashBackup build #2286 Copyright 2009-2019 HashBackup, LLC

Backup directory: /hb

Backup start: 2019-04-30 13:52:37

Copied HB program to /hb/hb#2286

This is backup version: 0

Dedup not enabled; use -Dmemsize to enable

/

/hb

/hb/inex.conf

/test

/test/.profile


Time: 0.1s

CPU:  0.1s, 57%

Mem:  56 MB

Checked: 5 paths, 1405 bytes, 1.4 KB

Saved: 5 paths, 1405 bytes, 1.4 KB

Excluded: 0

Dupbytes: 0

Compression: 40%, 1.7:1

Efficiency: 0.00 MB reduced/cpusec

Space: +832 bytes, 148 KB total

No errors


$ hb export -c hb

HashBackup build #2286 Copyright 2009-2019 HashBackup, LLC

Backup directory: /hb

Copying databases to export directory

Backup directory: /hb/export

Generating new random key with passphrase

New passphrase? 

New passphrase again? 

Copied old key to /hb/export/key.conf.orig

Created key file /hb/export/key.conf

Key file set to read-only

Rekeying exported databases with new key

Clearing backup keys

Clearing file hashes

Clearing block hashes

Changing pathnames to numbers

Changing user and group names to numbers

Compressing exported database to remove unused space

Generating export files

Writing hb.db.0

Deleting original key from export directory

Creating export.tar file in backup directory

Deleting export temp files


IMPORTANT: this export is not a backup of your HB database.

Information has been removed and files cannot be restored

using this export.


Export tar file is: /hb/export.tar

This file is compressed and will not compress further.


$ tar -xvf hb/export.tar

x export/

x export/dest.db

x export/hb.db.0

x export/key.conf


$ hb ls -c export

HashBackup build #2286 Copyright 2009-2019 HashBackup, LLC

Backup directory: /export

Passphrase? 

  Loading /export/hb.db.0

  Verified signature

Verified hb.db signature

Most recent backup version: 0

Showing most recent version, use -ad for all

/  (parent, partial)

/1  (parent, partial)

/1/2

/3

/3/4


$ hb ls -lv -c export

HashBackup build #2286 Copyright 2009-2019 HashBackup, LLC

Passphrase? 

Backup directory: /export

Most recent backup version: 0

Showing most recent version, use -ad for all

   0 drwxrwxr-t    1    0   80        0 2019-04-30 13:52:29 2019-04-30 13:52:37 /  (parent, partial)

            2 2019-04-30 13:52:29          1 

   0 drwx------    1  501   80        0 2019-04-30 13:52:37 2019-04-30 13:52:37 /1  (parent, partial)

     14150140 2019-04-30 13:52:37          2 

   0 -rw-r--r--    1  501   80      522 2019-04-30 13:52:29 2019-04-30 13:52:37 /1/2

     14150144 2019-04-30 13:52:29          3                              [ffffffffffffffffffffffffffffffffffffffff]

   0 drwxr-xr-x    1  501   80        0 2019-04-30 13:50:26 2019-04-30 13:52:37 /3

     14150050 2019-04-30 13:50:26          4 

   0 -rw-r--r--    1  501   80      883 2019-04-30 13:50:26 2019-04-30 13:52:37 /3/4

     14150051 2019-04-30 13:50:26          5                              [ffffffffffffffffffffffffffffffffffffffff]

Comments