Re: rights messed up after moving installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@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"

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux