parted /dev/sdb

GNU Parted 3.5
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) **mklabel gpt**
(parted) m**kpart primary ext4 0% 100%**
(parted) **quit**

mkfs.ext4 /dev/sdb1

lsblk
### output ###
...
sdb      8:16   0   10G  0 disk
└─sdb1   8:17   0   10G  0 part
### output ###

blkid
### output ###
...
/dev/sdb1: UUID="[고유 UUID]" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="[고유 PARTUUID]"
### output ###

mkdir /backup

vi /etc/fstab

### vi ###
UUID=[고유 UUID]       /backup ext4    defaults        0       0
### vi ###

systemctl daemon-reload
mount -a

vi /opt/backup.sh

### vi ###
#!/bin/bash

rsync -av --delete /var/mail/ /backup/mailbox/
rsync -av --delete /etc/postfix/ /backup/postfix/
rsync -av --delete /etc/dovecot/ /backup/dovecot/
### vi ###

chmod +x /opt/backup.sh
mkdir /backup/mailbox
mkdir /backup/postfix
mkdir /backup/dovecot
vim /etc/crontab
* *     * * *   root    /opt/backup.sh
diff -r /var/mail /backup/mailbox
diff -r /etc/postfix /backup/postfix
diff -r /etc/dovecot /backup/dovecot