I've used this one a few times. I RSYNC system to a local folder (other partition) and exclude. Then you and TAR compress it, if you want.
mkdir /backup1; time rsync -aAXv -h --exclude={/backup*,/dev,/home,/lost+found,/media,/mnt,/mnt2,/proc,/run,/sys,/tmp,/var/lib/lxcfs,/var/lib/lxd/unix.socket} / /backup1
Verify the excluded folders and add/remove what fits your system.
Then you can just TAR the backup1 folder.
tar czfp --rsyncable UbuntuServer1604.tar.gz ./backup1
OR install and use a parallel high compression codec like lbzip2 or a faster one like pgiz
apt install lbzip2 -y && time tar cf backup1.tar.bz2 ./backup1 --use-compress-program=lbzip2
I played around with just using TAR for backup but prefer RSYNC. TAR does have compression options like parallel 'lbzip2' and 'pigz':
small compressed file lbzip2 or fast with pigz -k; possible sync issues? lbzip4 if error debian?
Compressed TAR files is placed on the / but you should save to your choice of folder and make sure to add that to the exclude list.
apt install lbzip2 -y; sudo time tar cpf backup1.tar.bz2 --exclude={/backup*,/dev,/home,/lost+found,/media,/mnt,/mnt2,/proc,/run,/sys,/tmp,/var/lib/lxcfs,/var/lib/lxd/unix.socket} --use-compress-program=lbzip2 /
apt install pigz -y; sudo time tar cpf backup3.pigz.tar.gz --exclude={/backup*,/dev,/home,/lost+found,/media,/mnt,/mnt2,/proc,/run,/sys,/tmp,/var/lib/lxcfs,/var/lib/lxd/unix.socket} --use-compress-program=”pigz -k” /
Either way this is an easy way to add folders to exclude for live backups.
--exclude={/backup*,/dev,/home,/lost+found,/media,/mnt,/mnt2,/proc,/run,/sys,/tmp,/var/lib/lxcfs,/var/lib/lxd/unix.socket}