We Vi covered dekket the creation and extraction of compressed archives such as tar on a Linux machine. etablering og utvinning av komprimerte arkiver som tar på en Linux-maskin. A lot of Linux users use these compression formats for backups purposes. Mange Linux-brukere bruker disse komprimeringsformater for sikkerhetskopiering formål. Although this compresses pretty well it does not secure the backup. Selv om dette komprimerer ganske godt den sikrer ikke sikkerhetskopien. To do that you need to add a password, or to encrypt it. Å gjøre det du trenger å legge til et passord, eller for å kryptere den. Let's look at a simple form of securing your backup when you create an archive. La oss se på en enkel form for å sikre din backup når du oppretter et arkiv.
Note: these steps apply to files and folders of any kind – not just 'backups'. Merk: Disse trinnene gjelder for filer og mapper av alle slag - ikke bare "backup".
A quick recap of the compression and extraction of the tar.gz format. En rask oppsummering av komprimering og utvinning av tar.gz format. To compress a directory called todays_backup do the following: For å komprimere en katalog kalt todays_backup gjøre følgende:
# tar -zcf todays_backup.tar.gz todays_backup # Tar-zcf todays_backup.tar.gz todays_backup
This command will compress the directory todays_backup into the compressed file todays_backup.tar.gz . Dette kommandoen vil komprimere katalogen todays_backup i den komprimerte filen todays_backup.tar.gz. To decompress it use the following command: For å dekomprimere den bruker du følgende kommando:
# tar -zxf todays_backup.tar.gz # Tar-zxf todays_backup.tar.gz
Now to the fun part. Nå til morsomme delen. Let's look at how we can add a basic level of encryption to the process we used above. La oss se på hvordan vi kan legge til et grunnleggende nivå av kryptering til den prosessen vi brukte ovenfor. To compress the directory todays_backup with protection do the following: Å komprimere katalogen todays_backup med beskyttelse gjøre følgende:
# tar -zcf – todays_backup|openssl des3 -salt -k yourpassword | dd of=todays_backup.des3 # Tar-zcf - todays_backup | openssl des3-salt-k Yourpassword | dd av = todays_backup.des3
Replace yourpassword with a password of your own. Erstatt Yourpassword med et passord på din egen. Keep the password to yourself, and keep it carefully. Hold passordet til deg selv, og holde den nøye. The above command will generate a file called todays_backup.des3 . Det over kommandoen vil generere en fil som heter todays_backup.des3. This file can only be decompressed using this password. Denne filen kan bare pakket med dette passordet.
To extract your protected archive file todays_backup.des3 use the following command: Hvis du vil trekke beskyttede arkivfil todays_backup.des3 bruke følgende kommando:
# dd if= todays_backup.des3 |openssl des3 -d -k yourpassword |tar zxf - # Dd if = todays_backup.des3 | openssl des3-d-k Yourpassword | tar zxf --
Make note of the trailing - at the end. Noter etterfølgende - på slutten. It is not a typo, but a requirement for this command to work. Det er ikke en skrivefeil, men en forutsetning for denne kommandoen til å fungere. Replace yourpassword with the password you used while encrypting the file. Erstatt Yourpassword med passordet du brukte når kryptere filen. Executing the above command will extract the compressed file todays_backup.des3 into a directory todays_backup . Utfører det over kommandoen vil pakke ut den komprimerte filen todays_backup.des3 i en katalog todays_backup. Use this encryption with care. Bruk denne kryptering med omhu. As I said earlier, the only way you can retrieve your data once secured is by using the password, so do not lose this password under any circumstances. Som jeg sa tidligere, den eneste måten du kan hente data samtidig er sikret ved hjelp av passord, så ikke mister dette passordet under noen omstendigheter.























Why use the dd command? Hvorfor bruke dd kommandoen? Simple redirect will work as well. Enkelt redirect fungerer også. So the openssl command could be simplified to: Så openssl-kommandoen kunne forenkles til:
openssl des3 -salt -k yourpassword > todays_backup.des3
and og
openssl des3 -d -k yourpassword < todays_backup.des3
And anyone who checks the shell history knows your password. Og alle som sjekker skallet historien kjenner passordet.
I've not checked but the respective enciphering command MUST have a way of launching the command without putting the password into the command line. Jeg har ikke sjekket, men de respektive enciphering kommandoen må ha en måte å lansere kommandoen uten å sette passord i kommandolinjen.
Наша компания специализируется на оптовой продаже радиотелефонов, Наша компания специализируется на оптовой продаже радиотелефонов,
проводных телефонов, стационарных телефонов, системных телефонов, проводных телефонов, стационарных телефонов, системных телефонов,
домашних телефонов, офисных телефонов, АТС, мини АТС, факсов, и расходных материалов к ним. домашних телефонов, офисных телефонов, АТС, мини АТС, факсов, и расходных материалов к ним.
Оптом сотовые и обычные телефоны, радиотелефоны, факсы, мини-АТС, цифровое фото. Оптом сотовые и обычные телефоны, радиотелефоны, факсы, мини-АТС, цифровое фото.
Оптовая продажа проводных телефонов, радиотелефонов, факсов, мини-АТС. Оптовая продажа проводных телефонов, радиотелефонов, факсов, мини-АТС.
В нашем интернет магазине Вы всегда сможете подобрать любую бытовую технику: В нашем интернет магазине Вы всегда сможете подобрать любую бытовую технику:
Мясорубки Блендеры Мясорубки Блендеры
Водонагреватели Водонагреватели
Электро плиты Электро плиты
Кухонные вытяжки Кухонные вытяжки
Варочные панели Варочные панели
Стиральные машины Стиральные машины
Пылесосы Пылесосы
Фритюрницы Фритюрницы
Тостеры . Тостеры.
Продажа бытовой техники Bosch, Siemens, Gorenje, Beko, Blomberg и др. Продажа бытовой техники Bosch, Siemens, Gorenje, Beko, Blomberg и др.
Интернет магазин бытовой техникой Гейзер. Интернет магазин бытовой техникой Гейзер.
Geizer-shop.ru. Geizer-shop.ru.
В нашем интернет магазине Вы всегда сможете подобрать любую бытовую технику: В нашем интернет магазине Вы всегда сможете подобрать любую бытовую технику:
блендеры, кухонные комбайны, кофемолки, утюги, пароварки, микроволновки, блендеры, кухонные комбайны, кофемолки, утюги, пароварки, микроволновки,
стиральные машины, холодильники, кондиционеры. стиральные машины, холодильники, кондиционеры.
Продажа бытовой техники Bosch, Siemens, Gorenje, Beko, Blomberg и др. Продажа бытовой техники Bosch, Siemens, Gorenje, Beko, Blomberg и др.
Интернет магазин оптово-розничнной торговли бытовой техникой Лаура маркет. Интернет магазин оптово-розничнной торговли бытовой техникой Лаура маркет.
В нашем интернет магазине Вы всегда сможете подобрать и купить любую флеш карту. В нашем интернет магазине Вы всегда сможете подобрать и купить любую флеш карту.
У нас вы найдете хранители информации от следующих брендов : У нас вы найдете хранители информации от следующих брендов:
флэш-диски Transcend флэш-диски Transcend
портативный HDD Transcend портативный HDD Transcend
флэш-диски Kingston флэш-диски Kingston
флэш-диски APACER флэш-диски Apacer
флеш диски Corsair флеш диски Corsair
флэш-диски LG флэш-диски LG
портативные HDD Samsung портативные HDD Samsung
флеш карты PQI флеш карты PQI
флеш диски Sandisk флеш диски Sandisk