Backup Linux Folder manually with rsync to external NTFS Disk

Mostly external disks are usually formatted with NTFS to be ready to use on Windows. For backups usually rsync is a convenient tool since it can detect same files and shows progress. But if you want to rsync with NTFS  on linux there are maybe some pitfalls.

First of all you need to mount your disk after plugging in. You can find your disk with:

fdisk -l | grep NTFS 

If you have multiple disks just unplug your disks and replug it and find out the newly appearing disk e.g. /dev/sdb1.

Mount it with:

mkdir /mnt/ntfs-disk
mount -t ntfs /dev/sdb1 /mnt/ntfs-disk

Open a tmux session, which enables you to move the process in the background also if you disconnect from the server:

tmux

Copy your contents with following rsync command (dry-run with -n flag possible)

rsync -rvh --info=progress2 --size-only /home/johnny/Videos /mnt/ntfs-disk

This command with copies all files with -r recursively, shows it human readable with -h and verbose information with -v. Additionally --info=progress2 shows the overall progress including overall time left. --size-only copies only files where the size is not matching e.g. the file was not copied already or was modified (possible overwrite!). The directory Videos is copied with its contents to /mnt/ntfs-disk.

Now you can detach your tmux session by typing ctrl+b and d. Now you can disconnect you ssh session if you are logged in with one.

If you want to connect again - just look for your tmux session and connect again (my session was 0):

tmux list-sessions
tmux attach-session -t 0

If you are finished you can rerun the above rsync command again if you want to check - it should abort immediately if no file modification were done in the meantime.

Afterwards you need to unmount your disk:

umount /mnf/ntfs-disk

This following command should not show you a mount point for your disk:

lsblk | head -1 && lsblk | grep sdb

Now you can safely unplug your disk and your are finished.

Congratulations!

Sources:

rsync command in Linux with Examples - GeeksforGeeks
A computer science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

https://serverfault.com/questions/151986/rsync-command-to-synchronize-two-ntfs-drives/895072#895072

Showing total progress in rsync: is it possible?
I have searched for this option already, but have only found solutions that involve custom patching. The fact that it does not show in --help and no more info can be found probably indicates the an...
How to keep processes running after ending ssh session?
Let’s say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?

https://linuxconfig.org/how-to-mount-partition-with-ntfs-file-system-and-read-write-access

Verwenden von Rsync zum Synchronisieren von lokalen und entfernten Verzeichnissen | DigitalOcean
Rsync ist ein Tool zur intelligenten Synchronisierung von lokalen und entfernten Verzeichnissen. In diesem Artikel werden wir die grundlegende Verwendung dieses Dienstprogramms untersuchen, um Dateien aus dem Verzeichnis in das Verzeichnis und aus dem System in das System zu kopieren.