WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Backup with Date and Time  (Read 6106 times)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Backup with Date and Time
« Reply #15 on: May 26, 2011, 01:52:19 PM »
Are you now able to decrypt it using the command line?

Yes. I tested it before posting. I created an encrypted backup and then decrypted it using that command.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Backup with Date and Time
« Reply #16 on: May 26, 2011, 02:15:53 PM »
I have just updated this again, so if the "mydata=another-name" bootcode is used, it will still work.

http://wiki.tinycorelinux.net/wiki:backup_date
Many people see what is. Some people see what can be, and make a difference.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Backup with Date and Time
« Reply #17 on: May 26, 2011, 02:20:18 PM »
yeah it works.

i read a little bit in the manuals about sed, so i begin to understand...
so the sed command changes the ^ to " and $ to "...
that means the password in /etc/sysconfig/bfe is in the format ^password$ and for bcrypt it's needed in the format "password"!?
and afterwards sed prints the password two times to stdout !?

for this command line i need the password in a text-file.
i tried different ways like
echo "password" | bcrypt mydata.tgz.bfe
and didn't succeed...

do you see there a further approach that uses the password on the command line without the password-file?

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Backup with Date and Time
« Reply #18 on: May 26, 2011, 02:29:17 PM »
If you used the password

12345678

to encrypt it (encrypted backup).

Use

"12345678"

to decrypt it (command line).


http://wiki.tinycorelinux.net/wiki:encrypt_files
Many people see what is. Some people see what can be, and make a difference.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Backup with Date and Time
« Reply #19 on: May 26, 2011, 02:36:20 PM »
Quote
that means the password in /etc/sysconfig/bfe is in the format ^password$

No, ^ matches the beginning of the line and $ matches the end of the line. My command just adds double quotes around the password before passing it to bcrypt.

echo \"password\"|sed p|bcrypt mydata.tgz.bfe

will also work, but if your password is in a variable, you need to use:

echo \""$pw"\"|sed p|bcrypt mydata.tgz.bfe
« Last Edit: May 26, 2011, 02:39:05 PM by danielibarnes »

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: Backup with Date and Time
« Reply #20 on: May 26, 2011, 02:37:27 PM »
now i understand:
tc@box:~$ bcrypt mydata.tgz.bfe
Encryption key:
now i have to give my password in the format "password" and it encrypts fine.

thats what i was looking for, thank you friends.

hi danielibarnes,
i understand that sed is a very strong tool, that's worth to learn...

« Last Edit: May 26, 2011, 02:42:52 PM by netnomad »