In this scenario, let's say you want to clone your OS at the filesystem level and the source system (the system you want to clone from) is in use.
Doing a blind rsync / is a big problem because it uses twice as much space for no reason.
The reason for this is that with ecryptfs you have a /home/.ecryptfs directory which has the actual encrypted versions of your files and folders. However your home directory (eg. /home/someuser) is mounted.
Doing the blind rsync will ca........
The cool thing here is that we only need 1 drive to make a RAID 10 or RAID 1 array, we just tell the Linux mdadm utility that the other drive is "missing" and we can then add our original drive to the array after booting into our new RAID array.
Step#1 Install tools we need
yum -y install mdadm rsync
Step #2 Create your partitions on the drive that will be our RAID array
Here I assume it is /dev........
It is not obvious but the rsync --help
rsync --help|grep port
--port=PORT specify double-colon alternate port number
--port does not do anything at all actually for some strange reason it still uses 22
You have to specify a manual ssh command to make it work:
-e 'ssh -........
This is a common issue, what if a issue shouldn't have root but you want to use that user to make a full backup of a system? They of course need root access.
You can actually just give them passwordless sudo access to rsync in /etc/sudoers:
sudo vi /etc/sudoers
yourusername ALL = NOPASSWD: /usr/bin/rsync
Here is how you would execute rsync:
The key thing for the remote host is to........
Enter your login passphrase:
Inserted auth tok with sig [ee16d84] "into the user session keyring
mount: No such file or directory"
[ 156.118113] ecryptfs_mount: kern_path() failed
[ 156.118431] Reading sb failed; rc = [-2]
[ 164.233055] traps: mate-notificati trap int3 ip:7f43d7002c13 sp:7fff162c6600 error:0
[ 166.017061] ecryptfs_mount: kern_path() failed........
1.) Replicate the number of partitions in your new drives.
I created 3 partitions of the same same size.
partition #1: +1G (/boot)
partition #2: +60G (swap)
partition #3: rest of it (/)
#note if you are using GPT/gdisk you need to create separate a partition at least 1MB in size (in my case I would a 4th partition and mark it type ef02).........
Here is the scenario you or a client have a remote machine that was installed as a standard/default minimal Centos 6.x machine on a single disk with LVM for whatever reason. Often many people do not know how to install it to a RAID array so it is common to have this problem and why reinstall if you don't need to? In some cases on a remote system you can't easily reinstall without physical or KVM access.
So in this case you add a second physical or disk or already ha........
I've used rsync again for this because I found it very simple, I've only excluded the Cache directory since it's not necessary and could be several GB in size.
rsync -Phaz --exclude=Cache/* firstname.lastname@example.org:/home/user/.mozilla/firefox/profile.default/* /home/user/.mozilla/firefox/ec1n9opl.default/
This is a great way once again to get going how you were on the old/remote computer fairly quickly. It even restores all of your history in........