what is the best way to backup and restore dietpi ?

i have installed the packages what I need, it takes me a long time in a slow network connection.

i want to backup the system and user data as a backup.img

then i could flash on my tf card in future.

but my tf card is 64GB, and i just want a 1-2 gb img

please help me~~

You could use Win32 disk imager to make a copy of the card and then compress the image but you won’t get it down to the size you want.

Alternatively use dietpi-backup and backup to a USB flash or external hard drive.