Right way to make complete TWRP backup

You will be able in 3 minutes:
  1. Make FULL backup! With ALL phone data, all information - with ONE action.
  2. You backup also includes encrypted /data/. without re-encryption.
  3. You can ignore any faulty TWRP including if TWRP builded even not for your phone.
  4. No error will be reported.

What is EXCLUDED from a TWRP backup

Mostly TWRP comes from the other phone.
Also it can be build for your pone but builder not so good to build right partition list in TWRP.
So, TWRP with it BACKUP and MOUNT and WIPE sections in most cases will miss some partitions.
See below our method to fight it even with faulty TWRPs.

About our method

The main goal of our method is to backup whole internal sdcard/flash memory/Nand memory.
This is complete backup. with all of data, with encrypted/data/ partition and all the rest,
and we should not consider wrong fstab partition definitions in TWRP.
This is exact copy, precise and full.
And this is how:

What should I back up in TWRP

With our method you haven't to decide it. our method backups all.

This is How to Make Complete / Full BACKUP with TWRP

TWRP -> Advanced -> Terminal -> and invoke:
dd if=/dev/block/mmcblk0 | gzip -c9 > /external_sd/mmcblk0-full-raw-and-complete-backup

Little more description on what happens

This will backup /dev/block/mmcblk0 - as a device (in a terms of Linux OS) with dd unitily.
This is equivalent to make full raw backup of the PC disk, with all partitions and data.
  1. /dev/block/mmcblk0 - the internal flash device name.
  2. /external_sd/ is path to the directory where your "external" Micro SD card (you inserted in the phone device) mounted.

How to find right "DEVICE NAME", mount and find external "MICRO SD CARD PATH"

TWRP -> MOUNT -> check all of check boxes, including Micro SD card
TWRP -> Advanced -> Terminal -> df -h

#output will look like (interested highlighted with bold):

Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 921M  288K  921M   1% /dev
tmpfs                 921M     0  921M   0% /mnt
tmpfs                 921M   28K  921M   1% /tmp
/dev/block/mmcblk0p57 2.9G  2.4G  498M  84% /system_root  #<-- Device name !
/dev/block/mmcblk0p58 992M  419M  572M  43% /vendor       #<-- Device name !
/dev/block/mmcblk0p60  23G  1.0G   22G   5% /data         #<-- Device name !
/dev/block/mmcblk0p55 232M  344K  232M   1% /cache        #<-- Device name !
/dev/block/mmcblk0p59 488M  392M   96M  81% /cust         #<-- Device name !
/dev/block/mmcblk0p48  27M  704K   26M   3% /persist      #<-- Device name !
/dev/block/mmcblk1p1   29G   13G   16G  45% /external_sd  #<-- Micro SD card path !

This is How to Make Complete / Full RESTORE with TWRP

TWRP -> Advanced -> Terminal -> and invoke:
cat /external_sd/mmcblk0-full-raw-and-complete-backup | gzip -dc > /dev/block/mmcblk0

Always test your backup with restore

One you created backup - test it with the restore precedure.
You are OK if you are sure that your backup can be restored.