tl;dr
sudo tar czfv /backup.tar.gz --exclude=/backup.tar.gz --exclude=/dev --exclude=/mnt --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/run --exclude=/lost+found /
It will create an archive of all your files at /backup.tar.gz, which you can then copy over to another computer/drive and restore your files
sudo mksquashfs / /backup.sqsh -e /backup.sqsh /media /dev /mnt /proc /sys /tmp /run /lost+found
"-e" switch excludes folders you want to exclude
gnu wget
Examples:
wget -r -np -nd -l1 -A "*.md5" https://mxlinux.ipacct.com/MX-Linux/ANTIX/Final/antiX-19/ -P ./mx
‘-r’, ‘--recursive’
Specify recursive download
‘-np’, ‘--no-parent’
Do not ever ascend to the parent directory when retrieving recursively. This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded. See Directory-Based Limits, for more details.
‘-nd’, ‘--no-directories’
Do not create a hierarchy of directories when retrieving recursively. With this option turned on, all files will get saved to the current directory, without clobbering (if a name shows up more than once, the filenames will get extensions ‘.n’).
‘-l depth’, ‘--level=depth’
Set the maximum number of subdirectories that Wget will recurse into to depth. In order to prevent one from accidentally downloading very large websites when using recursion this is limited to a depth of 5 by default, i.e., it will traverse at most 5 directories deep starting from the provided URL. Set ‘-l 0’ or ‘-l inf’ for infinite recursion depth.
‘-A acclist’, ‘--accept acclist’
‘-R rejlist’, ‘--reject rejlist’
Specify comma-separated lists of file name suffixes or patterns to accept or reject (see Types of Files). Note that if any of the wildcard characters, ‘*’, ‘?’, ‘[’ or ‘]’, appear in an element of acclist or rejlist, it will be treated as a pattern, rather than a suffix. In this case, you have to enclose the pattern into quotes to prevent your shell from expanding it, like in ‘-A "*.mp3"’ or ‘-A '*.mp3'’.
‘-P prefix’, ‘--directory-prefix=prefix’
Set directory prefix to prefix. The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the top of the retrieval tree. The default is ‘.’ (the current directory).
touch /forcefsck
simply creates a file /forcefsck
. This file will cause the system to run fsck on the next reboot before the filesystem is mounted. Its similar to when you try to run chkdsk in Windows and it says it can't but it will do it on the next reboot.
Complete article about this - how-to-force-fsck-filesystem