Get Social

How to encrypt a backup and upload it on ftp or sftp?

If you need to upload backup to a third-party ftp-server (archive, just a file), however, you need to ensure that important information does not fall into the wrong hands, before uploading, encrypt it with a password and then upload it.

We encrypt the file with the openssl command

openssl aes-256-cbc -salt -in FILE -out FILE.aes -k PASSWORD
(openssl there are in most Linux distributions, and you can also install it in windows and mac os)
To request a password, you need to remove the “-k PASSWORD”.
You can decrypt with the command
openssl aes-256-cbc -d -salt -in FILE.aes -out FILE -k PASSWORD

 

How to upload to ftp (using curl best)

curl -s -T FILE -u USER:PASSWORD ftp://ftpserverhostname

 

How to upload to sftp

rsync -avz -e ssh USER@PASSWORD:/remote/directory/ /current/directory/file

 

How to upload to sftp with curl

short answer – use rsync over ssh and do not suffer 🙂

How to backup important files (windows)

Task: The ordinary user on windows needs to backup their data.

In search of an easy solution, I found a free and convenient FBackup program (www.FBackup.com).

After installation, do the following:

1. Open FBackup application

2. Choose “new backup” in left top corner


fbackup1

3. Set the name and select the disk and the folder where the backup copies will be stored


fbackup2

4. Click “next” and choose directory which you need to archive with “add folder” (so you can select multiple folders and files)

 

fbackup3

5. In the next window we can choose the encryption with the password of the archive

 fbackup4

6. Next – you can choose a schedule (or manually – it means no schedule), when to backup. Best of all – every day at a certain time.

 fbackup5

7. Then click “save” => “save and run”. Task for backup is ready. In the end you can configure start of Fbackup when the computer boots. For this you need to select in the main window File => Options => Startup and tick “Start at windows startup”

 
fbackup6

Done!

How to use truecrypt in windows

It is assumed that the latest correct version of TrueCrypt (7.1a) is already installed.

For comparison, hash should be:
md5 – 7a23ac83a0856c352025a6f7c9cc1526 TrueCrypt Setup 7.1a.exe
sha256 – e95eca399dfe95500c4de569efc4cc77b75e2b66a864d467df37733ec06a0ff2 TrueCrypt Setup 7.1a.exe

After installation, open the program and start creating an encrypted repository:

How to use truecrypt in windows, screenshot 01


Next – select the file container

How to use truecrypt in windows, screenshot 02

Next – choose a standard volume

How to use truecrypt in windows, screenshot 03

Next – come up with the name of the file inside which there will be an encrypted container and choose the path where it will lie:

How to use truecrypt in windows, screenshot 04

Next – you can configure the encryption settings (you can leave it as is)

How to use truecrypt in windows, screenshot 05

The size is chosen based on how much space will be needed for the data. To fit everything, it is better to use a minimum of 16GB flash drives. To make the container file fit on the flash drive, you need to make it the size = the size of the flash drive minus 10%, that is 8GB USB flash drive – 7.2 GB (simpler 7GB); 16GB flash drive – the file is 14.4 GB (simpler than 14GB). Also, if the container file is larger than 4gb, you will need to format the flash drive in the ntfs system (note that on the USB flash drives there is usually a fat32 file system that does not support files larger than 4gb, so if you need to transfer container file to a regular flash drive, then container must less 4gb).

How to use truecrypt in windows, screenshot 06

In the next window, you need to invent a password and remember it (if you lose it, the data inside the container is probably impossible to recover). After that, you will need to click Next and the Format button:

How to use truecrypt in windows, screenshot 07

At the end of the operation, it again suggests creating a container, so click Exit. The container is created 1 time. After that it can be used, as shown in the screenshot:

How to use truecrypt in windows, screenshot 08

that is: select a free mount point (in this case drive E), then select the file itself, then click Mount (enter the password when prompted).
Now you can open the “My Computer” folder and go to the drive by the letter you selected. This is the encrypted repository (container) of information. At the end of the job, you will need to click Dismount to properly disconnect the container.