rights messed up after moving installation

Reindl Harald h.reindl at thelounge.net
Mon Nov 5 22:48:15 UTC 2012



Am 05.11.2012 23:19, schrieb lee:
> The context is that I moved the root file system and /var from one disk
> to another with insufficient options to rsync.

BTW:
usually rsync deals really fine with doing a second run with other
options like "--times --perms --owner --group..." if you did not
the first time

rsync never will transmit unchanged data again because it wroks
like diff - i am using the following script for any copy/backup
even if it is single file because the params are what i really
mean: "copy files and folders with any attributes and if it is
a directory i like the target 1:1 compared with the source"

RSYNC_PARAMS is one line!

[root at srv-rhsoft:~]$ cat /usr/local/bin/rsync.sh
#!/bin/bash
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$1" == "$2" ]; then
 echo "USAGE: rsync.sh <source> <target> [bwlimit]"
 exit
fi
RSYNC_PARAMS="--no-motd --times --progress --force --recursive --delete-after --links --hard-links --devices
--specials --perms --owner --group --executability --acls --xattrs"
if [ `grep '@' <<< "$1"` ] || [ `grep '@' <<< "$2"` ]; then
 RSYNC_PARAMS="--compress $RSYNC_PARAMS"
fi
if [ "$3" != "" ]; then
 RSYNC_PARAMS="--bwlimit=$3 $RSYNC_PARAMS"
fi
nice -n 19 ionice -c 3 rsync $RSYNC_PARAMS --rsync-path='nice -n 19 ionice -c 3 rsync' "$1" "$2"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20121105/858b60ef/attachment-0001.sig>


More information about the users mailing list