WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: encrypted backup - problem to restore it  (Read 3404 times)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
encrypted backup - problem to restore it
« on: April 13, 2011, 06:50:12 PM »
i succeeded in creating an encrypted backup, but although i tried different boot options, i am not able to restore it.
my configuration:
usbstick installation 3.5.1 with two partitions: tce on /dev/sda2 with lable tc

one of my boot-codes
tinycore usbwait=5 restore=tc/tce protect

although there is a /mnt/sda2/tce/mybackup.tgz.bfe the prompt asks me two times for the encryption password.
the backup-bfe-file is not used and the restore-option over the gui-panel-application doesn' t work.

it would be great, if you could give me a hint.
thanks.
« Last Edit: April 13, 2011, 06:51:51 PM by netnomad »

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
10+ Years Contributing to Linux Open Source Projects.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: encrypted backup - problem to restore it
« Reply #2 on: April 15, 2011, 06:19:01 AM »
thanks, i' ve got it.

is there a way to encrypt the mydata.tgz.bfe manually, just for the case that i need a file or just want to look in the uncrypted tgz-package?

i get this error-message, although i used the right password (it's not a kmap problem!):
tc@box:~$ bcrypt mydata.tgz.bfe
Encryption key:
Invalid encryption key for file: mydata.tgz.bfe

is the command-line bcrypt different to the protect-mode-bcrypt?

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: encrypted backup - problem to restore it
« Reply #3 on: April 15, 2011, 10:50:20 AM »
is it possible to encrypt mydata.tgz.bfe (protected backup) with bcrypt on the command-line?

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: encrypted backup - problem to restore it
« Reply #4 on: April 15, 2011, 11:31:59 AM »
To encrypt mydata.tgz from command line use:

bcrypt -c mydata.tgz

You will be prompted to enter pass phrase twice.
Output will be mydata.tgz.bfe

To un-encrypt:

bcrypt -c mydata.tgz.bfe

You will be prompted for the pass phrase

To see how I did this via a script look at /usr/bin/filetool.sh
 
10+ Years Contributing to Linux Open Source Projects.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: encrypted backup - problem to restore it
« Reply #5 on: April 15, 2011, 11:56:07 AM »
thank you for your hint, i did not use the -c option yet.
yes, i' m also able to encrypt and un-encrypt files on the command-line, i've used it in different contexts....

my problem is to un-encrypt the mydata.tgz.bfe that was encrypted by the protected mode, in the automatic backup.
i read the /usr/bin/filetool.sh and i see that it should work, but perhaps there is a difference to use the same command in the script or as the user tc:staff on the command line!?

thank you for every new hint.
« Last Edit: April 16, 2011, 02:27:03 AM by netnomad »

Offline redwolf

  • Newbie
  • *
  • Posts: 20
Re: encrypted backup - problem to restore it
« Reply #6 on: April 11, 2012, 10:48:57 PM »
Quote
although there is a /mnt/sda2/tce/mybackup.tgz.bfe the prompt asks me two times for the encryption password.
the backup-bfe-file is not used and the restore-option over the gui-panel-application doesn' t work.

it would be great, if you could give me a hint.


I had trouble figuring this out too.  Turns out wrapping my password in quotes did the trick:

Code: [Select]
tc@box:/tmp/mydata$ bcrypt -c mydata.tgz.bfe
Encryption key: <-- THIS TIME I ENTERED MY KEY NORMALLY (i.e. MYSECRETKEY)
Invalid encryption key for file: mydata.tgz.bfe
tc@box:/tmp/mydata$ bcrypt -c mydata.tgz.bfe
Encryption key: <-- THIS TIME I ENTERED MY KEY WRAPPED IN QUOTES (I.e. "MYSECRETKEY")
tc@box:/tmp/mydata$ ls
mydata.tgz*