could someone "please" check 2 rsync commands I'm not sure the structure is right.
by bsurfin from LinuxQuestions.org on (#511KP)
I've been working on this for 2 weeks, I'd like someone that knows what they are doing with rsync to tell me if this should work on my Ubuntu 18.04 machines.
This works great, for making a backup and keeping it in sync exactly as it is on the server, same permissions and everything, I figured this out a couple years ago, it has worked perfect.
sudo rsync -r -t -p -o -g -v --progress --delete -l -H -D -s /mnt /media/jason/USB Backup/Backup
I noticed the format is sudo rsync options /source /target
I Modified the rsync commands I found on the internet below, I noticed that these have the / as the source directory in the middle of the options, or do I need to move that towards the end right before the destination directory ? this is why rsync is confusing so far, everyone seems to do it a little different, should these work ?
this one to backup my laptop:
sudo rsync -aAXv / --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","swapfile",".encryptfs"} /target
This one to help me turn my server into a virtual server, by copying the following to the guest HDD with a fresh ubuntu 18.04 install on my kvm server:
sudo rsync -auHxv / --exclude={"/etc/fstab*","/etc/network/*","/proc/*","/tmp/*","/sys/*","/dev/*","/mnt/*","/boot/*","/root/*","swapfile","/lost+found"} /target
The people putting these on the internet seemed confident, but I'm not sure the structure is right since the --exclude is after the / source directory.


This works great, for making a backup and keeping it in sync exactly as it is on the server, same permissions and everything, I figured this out a couple years ago, it has worked perfect.
sudo rsync -r -t -p -o -g -v --progress --delete -l -H -D -s /mnt /media/jason/USB Backup/Backup
I noticed the format is sudo rsync options /source /target
I Modified the rsync commands I found on the internet below, I noticed that these have the / as the source directory in the middle of the options, or do I need to move that towards the end right before the destination directory ? this is why rsync is confusing so far, everyone seems to do it a little different, should these work ?
this one to backup my laptop:
sudo rsync -aAXv / --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","swapfile",".encryptfs"} /target
This one to help me turn my server into a virtual server, by copying the following to the guest HDD with a fresh ubuntu 18.04 install on my kvm server:
sudo rsync -auHxv / --exclude={"/etc/fstab*","/etc/network/*","/proc/*","/tmp/*","/sys/*","/dev/*","/mnt/*","/boot/*","/root/*","swapfile","/lost+found"} /target
The people putting these on the internet seemed confident, but I'm not sure the structure is right since the --exclude is after the / source directory.