Linux Rsync like Windows Robocopy mirror command examples
by Mountain Computers Inc., Publication Date: Wednesday, July 15, 2020
View Count: 1132, Keywords: Robocopy, Rsync, Windows 10, Linux Mint 20, Hashtags: #Robocopy #Rsync #Windows10 #LinuxMint20
For those of you like me who like to use command line utilities and procedures for data transfers and backups, here are my examples for Robocopy utility and Rsync.
Example: This is my command prompt on C: is located a c:\users\andyf, and my command prompt when I switch to the x: drive (external 2TB drive) is on x:\backup\andyf
the command I type is very specific. The source and destination drive letters have to be in the right directory location for this to work (safely). The command is as follows:
robocopy c: x: /mir /w:0 /r:0 /xj /xd appdata /xf nt*.* /copy:dat /dcopy:t
note: the only thing inside AppData that I need and exclude it is the brookmarks and passwords and maybe legacy Microsoft Office PST files. Bookmarks and Passwords for browsers I use to manually copy over, for example: Firefox logins.json key3.db and key4.db and Chrome was Users Default yet Chrome is finicky and faulty so just cloud sync your profiles in both.
Example: This is the terminal command I type for the following drive source and destination. I have a 1TB NVMe m.2 where Linux Mint is installed and I have an internal 4TB WD Red SATA6 drive. My home directory is on the 1TB at /home/andyf and my destination is on the mount for /media/andyf/4TBdata/andyhome
(base) andyf@MTN-SYS:~$ sudo rsync -av --delete /home/andyf /media/andyf/4TBdata/andyhome
You should use SUDO in your command. Otherwise the --delete will not work. If you don't use SUDO in your command type in your password, the --delete will not remove your exceed files.
here is the stripped down results of my mounts:
/dev/nvme0n1p1 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/sda1 on /media/andyf/4TBdata type ext4 (rw,relatime)
more to come...
if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.
© 2023 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.