rsync daemon

2009-09-29 Thread Kaushal Shriyan
Hi,

I have followed https://help.ubuntu.com/community/rsync and
successfully configured it and works fine without any issue.

The question is how can i call the rsync client from the remote hosts
automatically to ping the rsync daemon and fetch only the new files
which is available on rsync server?

Thanks and Regards,

Kaushal
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


rsync command exclude option

2009-07-24 Thread Kaushal Shriyan
Hi,

I have a question about rsync. under /etc/ha.d/ there is a directory
called resource.d
I want to exclude it i have /etc/ha.d/resource.d in exclude.txt
when i run rsync -av /etc/ha.d 172.20.0.3:/root/ttt/ --exclude-from=exclude.txt
I still see resource.d being rsynced too on the destination host

Am i missing something ?

Thanks,

Kaushal
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync command exclude option

2008-11-26 Thread Kaushal Shriyan
On Wed, Nov 26, 2008 at 7:05 PM, Michal Soltys <[EMAIL PROTECTED]> wrote:

> Kaushal Shriyan wrote:
>
>> I want only .sql files to be rsynced to the destination host.
>>
>> when i do rsync -avz oldUnicelFiles hostB:/home/kaushal
>> --include-from=include.txt
>> it rsync all the files under oldUnicelFiles, I mean even .gz and .txt
>> files too.
>>
>> ~/oldUnicelFiles $ ls
>> 01-07-2008_LOG.txt.gz  01-08-2008_LOG.txt  02-09-2008_LOG.txt.sql
>> ~/oldUnicelFiles $
>>
>> cat include.txt
>> #
>> /oldUnicelFiles/*.sql
>> #
>>
>> am i missing something
>>
>>
> Include is rsync's default action, if no explicit pattern that would
> override it is specified.
>

Hi again

I have a directory logfiles and inside it it has lots of sub directories.
Inside it there are lots of .gz, .txt and .sql files
I want only .sql files to be rsynced to the destination host

is there a way to achieve it using rsync utility

Thanks and Regards

Kaushal
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: rsync command exclude option

2008-11-26 Thread Kaushal Shriyan
On Wed, Nov 26, 2008 at 5:28 PM, Michal Soltys <[EMAIL PROTECTED]> wrote:

> Kaushal Shriyan wrote:
>
>> Hi
>>
>> I do rsync -avz oldUnicelFiles hostB:/home/kaushal
>> --exclude-from=exclude.txt
>> but it rsynced  the excluded files too
>>
>> my exclude.txt file contains
>> 
>> /home/kaushal/oldUnicelFiles/*.gz
>> /home/kaushal/oldUnicelFiles/*.txt
>> 
>>
>> Any ideas as what am i doing wrong
>>
>>
> From rsync perspective, root of file transfers in your case would be
> /home/kaushal , not / . So ...
>
> /oldUnicelFiles/*.gz
> /oldUnicelFiles/*.txt
>
> ... should do the thing.
>
> If you used 'oldUnicelFiles/' instead of 'oldUnicelFiles' in rsync
> invocation, the root would be /home/kaushal/oldUnicelFiles/ .
>
>
>
> A note of warning if you plan on doing deletions in the future:
>
> rsync -avz --del oldUnicelFiles hostB:/home/kaushal
>
> ... would remove all files not existing on sending side, in
> hostB:/home/kaushal/oldUnicelFiles/
>
> ...but:
>
> rsync -avz --del oldUnicelFiles/ hostB:/home/kaushal
>
> ...would do the same in hostB:/home/kaushal/
>
> Both of the above would also protect already existing files on the
> receiving side, that match patterns in exclude.txt .
>
>
> Be sure to read carefully rsync's man.
>

Thanks a Lot

I want only .sql files to be rsynced to the destination host.

when i do rsync -avz oldUnicelFiles hostB:/home/kaushal
--include-from=include.txt
it rsync all the files under oldUnicelFiles, I mean even .gz and .txt files
too.

~/oldUnicelFiles $ ls
01-07-2008_LOG.txt.gz  01-08-2008_LOG.txt  02-09-2008_LOG.txt.sql
~/oldUnicelFiles $

cat include.txt
#
/oldUnicelFiles/*.sql
#

am i missing something

Thanks and Regards

Kaushal
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

rsync command exclude option

2008-11-26 Thread Kaushal Shriyan
Hi

I do rsync -avz oldUnicelFiles hostB:/home/kaushal
--exclude-from=exclude.txt
but it rsynced  the excluded files too

my exclude.txt file contains

/home/kaushal/oldUnicelFiles/*.gz
/home/kaushal/oldUnicelFiles/*.txt


Any ideas as what am i doing wrong

Thanks and Regards

Kaushal
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: rsync error

2008-04-04 Thread Kaushal Shriyan
On Fri, Apr 4, 2008 at 4:51 PM, Steven Hartland <[EMAIL PROTECTED]> wrote:
> Log file is likely locked.
>
>  - Original Message - From: "Kaushal Shriyan"
> <[EMAIL PROTECTED]>
>
>
>
> > hi
> >
> > I have the script http://pastebin.com/d4b062d28 and the roots cron
> > entry are as below
> >
> > 30 2 * * * su sms /usr/local/bin/testrsync_mysql.sh
> >
> > I am getting the below error
> >
> > building file list ... rsync: opendir "/var/lib/mysql/wordpress"
> > failed: Permission denied (13) done mysql/ib_logfile0
> > mysql/ib_logfile1
> > Killed by signal 2.
> > rsync error: unexplained error (code 255) at rsync.c(276) [sender=2.6.9]
> >
> > Any clue as what is happening
> >
>
>
>  
>  This e.mail is private and confidential between Multiplay (UK) Ltd. and the
> person or entity to whom it is addressed. In the event of misdirection, the
> recipient is prohibited from using, copying, printing or otherwise
> disseminating it or any information contained in it.
>  In the event of misdirection, illegible or incomplete transmission please
> telephone +44 845 868 1337
>  or return the E.mail to [EMAIL PROTECTED]
>
>

hi steven

I am getting the below error now

building file list ... rsync: pop_dir "/root" failed: Permission
denied (13) rsync error: errors selecting input/output files, dirs
(code 3) at flist.c(1356) [sender=2.6.9]

Thanks and Regards

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


rsync error

2008-04-04 Thread Kaushal Shriyan
hi

I have the script http://pastebin.com/d4b062d28 and the roots cron
entry are as below

30 2 * * * su sms /usr/local/bin/testrsync_mysql.sh

I am getting the below error

building file list ... rsync: opendir "/var/lib/mysql/wordpress"
failed: Permission denied (13) done mysql/ib_logfile0
mysql/ib_logfile1
Killed by signal 2.
rsync error: unexplained error (code 255) at rsync.c(276) [sender=2.6.9]

Any clue as what is happening

Thanks and Regards

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


Re: rsync errors

2008-03-27 Thread Kaushal Shriyan
On Thu, Mar 27, 2008 at 7:56 PM, Kaushal Shriyan
<[EMAIL PROTECTED]> wrote:
>
> On Wed, Mar 26, 2008 at 6:21 PM, Matt McCutchen <[EMAIL PROTECTED]> wrote:
>  > On Tue, 2008-03-25 at 23:21 +0530, Kaushal Shriyan wrote:
>  >  > How do i  set the "sms" user on hostaa to have permission to set
>  >  > permissions on
>  >  > /var/lib/mysql?
>  >  >
>  >  > I have given  #setfacl -R -m u:sms:rwx /var/lib/mysql on hostaa
>  >  >   #setfacl -R -m g:sms:rwx /var/lib/mysql on hostaa
>  >
>  >  The second command is unnecessary; granting access to the user "sms" is
>  >  enough.  But you also have to set the default ACL so that "sms" will
>  >  have permissions on new files created by "mysql".  To do this, run the
>  >  same command plus the -d option:
>  >
>  >  setfacl -R -dm u:sms:rwx /var/lib/mysql
>  >
>  >  You should also add user "mysql" to the access and default ACLs in the
>  >  same way so that it will have access to files created by "sms".
>  >  Finally, adding "rwx" entries to the access ACLs of existing files will
>  >  turn on their S_IXGRP permission bit.  To fix that bit, run:
>  >
>  >  chmod -R g-x,g+X /var/lib/mysql
>  >
>  >  At this point, the "failed to open" errors should go away.  Rsync may
>  >  still fail to set the times of /var/lib/mysql because it is owned by
>  >  user "mysql" and only the owner of a file is allowed to set its times
>  >  arbitrarily.  To get rid of that error, you can pass --omit-dir-times .
>  >
>  >  Matt
>  >
>  >
>
>  Hi Matt
>
>  I followed your suggestion, but no luck
>  I did setfacl -R -dm u:sms:rwx /var/lib/mysql on hostaa
>setfacl -R -dm u:mysql:rwx /var/lib/mysql on hostaa
>chmod -R g-x,g+X /var/lib/mysql on hostaa
>
>  I am still getting the below error
>
>  building file list ... done
>
> mysql/
>  rsync: failed to set permissions on "/var/lib/mysql": Operation not
>  permitted (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/.keep_dev-db_mysql-0": Operation not permitted (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/host0084-bin.01": Operation not permitted (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/host0084-bin.02": Operation not permitted (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/host0084-bin.03": Operation not permitted (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/host0084-bin.index": Operation not permitted (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/host0084-relay-bin.01": Operation not permitted
>  (1)
>  rsync: failed to set permissions on
>  "/var/lib/mysql/host0084-relay-bin.index": Operation not permitted (1)
>  mysql/ib_logfile0
>  mysql/ib_logfile1
>  mysql/ibdata1
>  mysql/master.info
>  rsync: failed to set permissions on "/var/lib/mysql/relay-log.info":
>  Operation not permitted (1)
>
>  Please let me know if i am missing something
>
>  Thanks and Regards
>
>  Kaushal
>

Hi Matt,

Any clue on the issue

Thanks

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

Re: rsync errors

2008-03-27 Thread Kaushal Shriyan
On Wed, Mar 26, 2008 at 6:21 PM, Matt McCutchen <[EMAIL PROTECTED]> wrote:
> On Tue, 2008-03-25 at 23:21 +0530, Kaushal Shriyan wrote:
>  > How do i  set the "sms" user on hostaa to have permission to set
>  > permissions on
>  > /var/lib/mysql?
>  >
>  > I have given  #setfacl -R -m u:sms:rwx /var/lib/mysql on hostaa
>  >   #setfacl -R -m g:sms:rwx /var/lib/mysql on hostaa
>
>  The second command is unnecessary; granting access to the user "sms" is
>  enough.  But you also have to set the default ACL so that "sms" will
>  have permissions on new files created by "mysql".  To do this, run the
>  same command plus the -d option:
>
>  setfacl -R -dm u:sms:rwx /var/lib/mysql
>
>  You should also add user "mysql" to the access and default ACLs in the
>  same way so that it will have access to files created by "sms".
>  Finally, adding "rwx" entries to the access ACLs of existing files will
>  turn on their S_IXGRP permission bit.  To fix that bit, run:
>
>  chmod -R g-x,g+X /var/lib/mysql
>
>  At this point, the "failed to open" errors should go away.  Rsync may
>  still fail to set the times of /var/lib/mysql because it is owned by
>  user "mysql" and only the owner of a file is allowed to set its times
>  arbitrarily.  To get rid of that error, you can pass --omit-dir-times .
>
>  Matt
>
>

Hi Matt

I followed your suggestion, but no luck
I did setfacl -R -dm u:sms:rwx /var/lib/mysql on hostaa
   setfacl -R -dm u:mysql:rwx /var/lib/mysql on hostaa
   chmod -R g-x,g+X /var/lib/mysql on hostaa

I am still getting the below error

building file list ... done
mysql/
rsync: failed to set permissions on "/var/lib/mysql": Operation not
permitted (1)
rsync: failed to set permissions on
"/var/lib/mysql/.keep_dev-db_mysql-0": Operation not permitted (1)
rsync: failed to set permissions on
"/var/lib/mysql/host0084-bin.01": Operation not permitted (1)
rsync: failed to set permissions on
"/var/lib/mysql/host0084-bin.02": Operation not permitted (1)
rsync: failed to set permissions on
"/var/lib/mysql/host0084-bin.03": Operation not permitted (1)
rsync: failed to set permissions on
"/var/lib/mysql/host0084-bin.index": Operation not permitted (1)
rsync: failed to set permissions on
"/var/lib/mysql/host0084-relay-bin.01": Operation not permitted
(1)
rsync: failed to set permissions on
"/var/lib/mysql/host0084-relay-bin.index": Operation not permitted (1)
mysql/ib_logfile0
mysql/ib_logfile1
mysql/ibdata1
mysql/master.info
rsync: failed to set permissions on "/var/lib/mysql/relay-log.info":
Operation not permitted (1)

Please let me know if i am missing something

Thanks and Regards

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

Re: rsync errors

2008-03-25 Thread Kaushal Shriyan
On Tue, Mar 25, 2008 at 10:12 PM, Paul Slootman <[EMAIL PROTECTED]>
wrote:

> On Tue 25 Mar 2008, Kaushal Shriyan wrote:
> >
> > I am running the command
> >
> > /usr/bin/rsync -avO /var/lib/mysql [EMAIL PROTECTED]:/var/lib/ >
> > /tmp/rsync-${TIMESTAMP}.log 2>&1
> >
> > I am getting the below error in the log file
> >
> > mysql/
> > rsync: failed to set permissions on "/var/lib/mysql": Operation not
> > permitted (1)
>
> Does the "sms" user on hostaa have permission to set permissions on
> /var/lib/mysql? I would guess not, that's probably owned by the "mysql"
> user... That's the cause of your error.
>
>
> Paul Slootman
> --
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: 
> http://www.catb.org/~esr/faqs/smart-questions.html<http://www.catb.org/%7Eesr/faqs/smart-questions.html>


hi

Thanks Paul Slootman

How do i  set the "sms" user on hostaa to have permission to set permissions
on
/var/lib/mysql?

I have given  #setfacl -R -m u:sms:rwx /var/lib/mysql on hostaa
  #setfacl -R -m g:sms:rwx /var/lib/mysql on hostaa

Please let me know if there is anything else to be done

Thanks and Regards

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

rsync errors

2008-03-25 Thread Kaushal Shriyan
Hi

I am running the command

/usr/bin/rsync -avO /var/lib/mysql [EMAIL PROTECTED]:/var/lib/ >
/tmp/rsync-${TIMESTAMP}.log 2>&1

I am getting the below error in the log file

mysql/
rsync: failed to set permissions on "/var/lib/mysql": Operation not
permitted (1)
rsync: failed to open "/var/lib/mysql/ib_logfile0", continuing: Permission
denied (13)
mysql/ib_logfile0
rsync: failed to open "/var/lib/mysql/ib_logfile1", continuing: Permission
denied (13)
mysql/ib_logfile1
rsync: failed to open "/var/lib/mysql/ibdata1", continuing: Permission
denied (13)
mysql/ibdata1
rsync: failed to open "/var/lib/mysql/master.info", continuing: Permission
denied (13)
mysql/master.info
rsync: failed to open "/var/lib/mysql/SCHEDULER/ScheduleTasks.MYD",
continuing: Permission denied (13)

Any thing I am missing

Thanks and Regards

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