How to backup Ubuntu 17.10 to disk image

thanks for the supoort first/
how can i backup my os to image every day.

Are you talking about making backup image of entire hard disk? If so

  1. Boot from a live Linux CD/USB media
  2. Make sure no partitions are mounted on the target hard disk.
  3. Mount the external hard disk or NFS
  4. Backup the drive:
dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c  > /path/to/mount/usb/backup.img.gz

Input drive is /dev/sdX and output /path/to/mount is either nfs or usb mount point. Be careful with if= and of= parameters.

in the begining thanks for the support.
can it done from my ubuntu when he is mount

Noop. You need to live image. Only files can be backup up when mounted.

it is possible with btrfs using snapshots, but with ext3/4 filesystem nope