find & chmod & xargs – changing uid of files

Because of the system reinstallation & user ids remapping, I wanted to update all of the files from given UID to new UID. One of the ways to do this is to find all files with given UID and perform chown on these files. You could do this one by one, by find . -uid ...

RSnapshot – migrate to other drive

Once you start using rsnapshot and you haven’t thought about increasing hard drive requirements, you didn’t setup LVM, you might want to migrate yours rsnasphot directory to bigger drive, preferably under LVM. You might see how to setup LVM here When it comes to migrate your current rsnapshot backup to other drive, you have two ...

Obtaining UUID of partition

To get UUID of the partition /dev/sdc3, run: [cc lang=”bash”] blkid /dev/sdxx [/cc] You might use it to create /etc/fstab entry for this drive, if you can expect that it might get different letters of drive (for example it is USB drive)

BadBlocks checking

Want to be sure new drive is fine (has no badblocks?) Run [cc lang=”bash”] badblocks -wvs /dev/sdx [/cc] (might take ~50 hours on 3TB HDD). It will write down specific patterns on HDD, verifying them (four different patterns for whole drive). It will wipe out your data on sdX