Daryl Sayers | 1 Jun 2007 06:08
Picon

Trying to define exclude with an include list


I need to backup a set of machines that are very similar in nature. I had
created an exclude list to backup everything except whats in my list. I
then used the --exclude-from=myexcludefile so rsync would not copy unwanted
files. eg:

/tmp
/var/tmp
/var/lock
.... long list of others
/u1

I have 2 drives on each machine and up until now I have no need to be backing
up the 2nd drive. Thats what the /u1 is for. This meant I would exclude
everything on /u1. I have now put some information in a directory in
/u1/important that needs to be backed up. My problem is that I need the
exclude list to stay generic enough to run on all machines but also backup
the /u1/important directory.
I tried converting the list to a filter like:

+ /u1/important
- /tmp
- /var/tmp
- /var/lock
.... 
- /u1

But this didnt work, then did

+ /u1/
(Continue reading)

David (Spartoo | 1 Jun 2007 13:40
Picon

Re: Archive parameter doesn't preserve owner:group property!

>As a convenience and courtesy, rsync attempts to preserve names across the transfer
I don't know if my request is clear...sorry for my bad english...

I just need to preserve ID...I don't want rsync to convert id to name group because it takes the name group of the server instead of my local machine.
I run rsync command in local machine in root, the deamon is run in root too, in rsyncd.conf in my module I set gid=root, uid=root...I have tried --numeric-ids parameter...and nothing...
So if you know another tool which do that...


2007/5/31, Tony Abernethy <tony <at> servacorp.com>:
The uid and gid are numbers.  These numbers  **MIGHT** correspond to one or more names.
As a convenience and courtesy, rsync attempts to preserve names across the transfer
Who ever is running the rsync daemon must have the rights to make the changes or there is nothing possible for rsync to do.
To preserve the groups, I think the owner can change groups to/from groups that the owner is in.
You will want to test on you system exactly what is tolerated --- I'd expect that the owner needs to belong to both groups.
 
If it were me, I'd use chroot and uid=root and gid=root
--- but then I've found that OPEN-NESS seems to be the only effective and cost-effective security mechanism. (Even to ridiculous extents;)
(Everything else seems like turning out the street lights so the bad guys can't see you)

From: rsync-bounces+tony=servacorp.com <at> lists.samba.org [mailto:rsync-bounces+tony=servacorp.com <at> lists.samba.org] On Behalf Of David (Spartoo)
Sent: Thursday, May 31, 2007 9:08 AM
To: rsync <at> lists.samba.org
Subject: Re: Archive parameter doesn't preserve owner:group property!

someone??

Does I have to set gid and uid to "root"? or can I preserve initial owner:group setting uid to "david" and gid to "rsync-users"?
Can I give to rsync-users the right to preserve owner:group? How?
Is there a conflict between  --numeric-ids and others parameters? because rsync doesn't preserve even "in root" owner:group if gid is a number instead of string.

I have post to many Linux forums...rsync mailing-list is my last chance.

--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Tony Abernethy | 1 Jun 2007 14:25

RE: Archive parameter doesn't preserve owner:group property!

On  BOTH  sides do a ls -n whatever
This will show the numeric IDs on both sides.
Most likely the SAME numeric id will be one thing on one host and something else on the other host.
 
Most likely --numeric-ids is doing exactly what it is supposed to do
ls -l will show names if it can find a name that corresponds to the (numeric) id.
 
Most every tool will store the file with the owner and group of what runs on the target.
The alternative is probably to tar the files on the source, transfer the tarball, untar the files on the target.

From: David (Spartoo) [mailto:david.spartoo <at> gmail.com]
Sent: Friday, June 01, 2007 6:41 AM
To: tony <at> servacorp.com
Cc: rsync <at> lists.samba.org
Subject: Re: Archive parameter doesn't preserve owner:group property!

>As a convenience and courtesy, rsync attempts to preserve names across the transfer
I don't know if my request is clear...sorry for my bad english...

I just need to preserve ID...I don't want rsync to convert id to name group because it takes the name group of the server instead of my local machine.
I run rsync command in local machine in root, the deamon is run in root too, in rsyncd.conf in my module I set gid=root, uid=root...I have tried --numeric-ids parameter...and nothing...
So if you know another tool which do that...


2007/5/31, Tony Abernethy <tony <at> servacorp.com>:
The uid and gid are numbers.  These numbers  **MIGHT** correspond to one or more names.
As a convenience and courtesy, rsync attempts to preserve names across the transfer
Who ever is running the rsync daemon must have the rights to make the changes or there is nothing possible for rsync to do.
To preserve the groups, I think the owner can change groups to/from groups that the owner is in.
You will want to test on you system exactly what is tolerated --- I'd expect that the owner needs to belong to both groups.
 
If it were me, I'd use chroot and uid=root and gid=root
--- but then I've found that OPEN-NESS seems to be the only effective and cost-effective security mechanism. (Even to ridiculous extents;)
(Everything else seems like turning out the street lights so the bad guys can't see you)

From: rsync-bounces+tony=servacorp.com <at> lists.samba.org [mailto:rsync-bounces+tony=servacorp.com <at> lists.samba.org] On Behalf Of David (Spartoo)
Sent: Thursday, May 31, 2007 9:08 AM
To: rsync <at> lists.samba.org
Subject: Re: Archive parameter doesn't preserve owner:group property!

someone??

Does I have to set gid and uid to "root"? or can I preserve initial owner:group setting uid to "david" and gid to "rsync-users"?
Can I give to rsync-users the right to preserve owner:group? How?
Is there a conflict between  --numeric-ids and others parameters? because rsync doesn't preserve even "in root" owner:group if gid is a number instead of string.

I have post to many Linux forums...rsync mailing-list is my last chance.

--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Wayne Davison | 1 Jun 2007 16:38
Picon
Favicon

Re: Trying to define exclude with an include list

On Fri, Jun 01, 2007 at 02:08:08PM +1000, Daryl Sayers wrote:
> + /u1/important
> - /tmp
> - /var/tmp
> - /var/lock
> .... 
> - /u1

The man page talks about how the exclusion of the parent directory
short-circuits the directory traversal, and the u1 dir is never even
visited (giving the include nothing to match).  You need something
like this:

+ /u1/
+ /u1/important
- /u1/*
.....

That way rsync can get into the dir, match what you want, and exclude
everything else.

..wayne..
--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Thiep Duong | 1 Jun 2007 17:25
Favicon

Cannot see the digest

I just subcribe to the list to find Rsync from win-xp to
my samba UNIX box.  however, I cannot find how to get the old
archive and/or do any searching on the list.

I click on the "archive rsync" it send me right back to the
https://lists.samba.org/mailman/

TDuong

--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Youtube | 1 Jun 2007 17:47
Picon

The best you tube video

http://yenibiris.sendeyolla.com/medyadetay.aspx?&tid=3&cid=57&id=61365

--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Matt McCutchen | 2 Jun 2007 00:13
Picon

Re: Cannot see the digest

That's odd.  The link works for me.  Try these links:

http://www.mail-archive.com/rsync <at> lists.samba.org/
http://news.gmane.org/gmane.network.rsync.general/
http://lists.samba.org/archive/rsync/

Matt

On 6/1/07, Thiep Duong <Thiep.Duong <at> am.necel.com> wrote:
> I just subcribe to the list to find Rsync from win-xp to
> my samba UNIX box.  however, I cannot find how to get the old
> archive and/or do any searching on the list.
>
> I click on the "archive rsync" it send me right back to the
> https://lists.samba.org/mailman/
--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Thiep Duong | 2 Jun 2007 00:27
Favicon

Re: Cannot see the digest

Hi Matt,

Thanks for checking ... I think it's due to my security setting
on Firefox -- I try to open it using IE => Okay

I will look at the Firefox setup later to see what does it.

Thanks

Thiep

TMatt McCutchen wrote:
> That's odd.  The link works for me.  Try these links:
> 
> http://www.mail-archive.com/rsync <at> lists.samba.org/
> http://news.gmane.org/gmane.network.rsync.general/
> http://lists.samba.org/archive/rsync/
> 
> Matt
> 
> On 6/1/07, Thiep Duong <Thiep.Duong <at> am.necel.com> wrote:
>> I just subcribe to the list to find Rsync from win-xp to
>> my samba UNIX box.  however, I cannot find how to get the old
>> archive and/or do any searching on the list.
>>
>> I click on the "archive rsync" it send me right back to the
>> https://lists.samba.org/mailman/
--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Matt McCutchen | 2 Jun 2007 06:25
Picon

Re: Newbie problems

On 5/28/07, Boniforti Flavio <boniforti.f <at> gmail.com> wrote:
> I want to back-up my PC's /home directory onto another Linux PC. On
> the "server" I've set up a directory called /backup and now I'd like
> to know which permissions it should have for that my backups succeed.
>
> What I want to achieve is that I have my /home eactly copied over,
> maintaining ownership and permissions on files and directories. Is
> this possible?

Yes; just pass the -a option to the client.  You may also wish to use
--numeric-ids .

> How should I be setting "uid" and "gid" in the server's conf file?

You should set both to root so that the server (more properly called a
daemon) has the power to set the ownership of the backup files.
Otherwise, the daemon will silently skip setting the ownership.

> How should the permissions on /backup be set?

The daemon will work no matter what the permissions and ownership of
/backup are because it has root power.  However, you may wish to copy
/home onto /backup/home rather than /backup (if you weren't planning
to do so already) and then set /backup to 700 permissions and
root:root ownership.  That would prevent other users on the server
computer from accessing the backup directly.

Matt
--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Boniforti Flavio | 2 Jun 2007 13:42
Picon

Re: Newbie problems

On 6/2/07, Matt McCutchen <hashproduct+rsync <at> gmail.com> wrote:
> > How should I be setting "uid" and "gid" in the server's conf file?
>
> You should set both to root so that the server (more properly called a
> daemon) has the power to set the ownership of the backup files.
> Otherwise, the daemon will silently skip setting the ownership.

That is done in the /etc/rsyncd.conf file, right?
Mine is as follows:

log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock

[Backup]
path = /backups
comment = Server di backup
uid = root
gid = root
read only = no
list = yes
auth users = bonny
secrets file = /etc/rsyncd.scrt

In rsyncd.scrt I have user:password for my normal user (bonny).

On the client I state:

rsync -aPvz ACER-TM525TX/ rsync://bonny <at> 192.168.1.69/Backup

which actually has permitted me to copy over that first directory.

> > How should the permissions on /backup be set?
>
> The daemon will work no matter what the permissions and ownership of
> /backup are because it has root power.  However, you may wish to copy
> /home onto /backup/home rather than /backup (if you weren't planning
> to do so already) and then set /backup to 700 permissions and
> root:root ownership.  That would prevent other users on the server
> computer from accessing the backup directly.

Well, I've set it up like you told me to, but after having executed
the first "rsync" I got following permissions on /backups:

755 and "bonny:bonny" as the owner of that directory.

Is this OK?
Why is this happening?

Many thanks so far...
--

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Gmane