This is tested on ASUS ROG G55VW, Xubuntu 18.04.
Automate Backuping From Remote Computer via SSH
Automate Disk Imaging on Ubuntu With DD and Cronjob
Note that DD copies byte by byte, that means even space that is not used. There is workaroud by writing zeros on not used disk space, but not included in this article.
First find out what you want to include in your image. You can list all your disks and partitions with command.
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
You get very good overview of your disk structure. For example here is mine. I have three disks, which can be found from path /dev/sda, /dev/sdb etc. And their partitioins are found from /dev/sda/sda1 etc. NOTE THAT WHEN USING DD DESTINATION DISK HAS TO BE SAME SIZE OR BIGGER THAN ORIGINAL.
I’m going to make disk image from my primary HDD to my backup HDD, which is connected via USB docking station. Thats sda to sdb. I want it to automatically do fresh image once a week. For modifying your backup sycle, edit /etc/crontab file. How to set up cron made simple on askubuntu. I edited mine /etc/contab file to execute cron.weekly every thursay at 23.00.
Then make a shell script to make the script to execute imaging process. Below is syntax of the command and example of mine. Remember to make shell file as executable. Note that you may have to use sudo to allow copying. I had to.
dd if=/make/image/from/here of=/path/to/backup/image
sudo chmod +x shellfilename.sh
Thats the basic consept. Now how to send the image across the Internet.