Sponsored Content
Top Forums Shell Programming and Scripting Showing off my rsync-to-USB script Post 302362965 by steadyonabix on Monday 19th of October 2009 04:00:56 AM
Old 10-19-2009
Nice Smilie

You might want to add a check that the destination path is writable as well.

I'll try this on my Ubuntu server.

Cheers

---------- Post updated at 09:00 AM ---------- Previous update was at 08:55 AM ----------

A check of the exit values from rsync would be a good idea: -0Success 1Syntax or usage error 2Protocol incompatibility 3Errors selecting input/output files, dirs 4Requested action not supported: an attempt was made to manipulate 64-bit files on a platform that cannot support them; or an option was specified that is supported by the client and not by the server. 5Error starting client-server protocol 6Daemon unable to append to log-file 10Error in socket I/O 11Error in file I/O 12Error in rsync protocol data stream 13Errors with program diagnostics 14Error in IPC code 20Received SIGUSR1 or SIGINT 21Some error returned by waitpid() 22Error allocating core memory buffers 23Partial transfer due to error 24Partial transfer due to vanished source files 25The --max-delete limit stopped deletions 30Timeout in data send/receive 35Timeout waiting for daemon connection
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing script not showing up in ps -efx

Hi everyone, here's my problem. I have a script that runs in a infinite loop, repeating the same action in another script every 10 minutes. We need to monitor whether or not this loop script is running and be able to kill it should the need arise. However, the name of the script does not show up... (6 Replies)
Discussion started by: herman404
6 Replies

2. Filesystems, Disks and Memory

Cant' mount usb drive, /dev/sda1 not showing up

Hi, I'm trying to mount a usb drive but the path /dev/sda1 does not show up under /dev when I plug in the usb device. In fact I see no differences under /dev before and after I plugin my usb drive. Any ideas why the system is not recognizing the usb drive and how to fix? This is on a... (3 Replies)
Discussion started by: orahi001
3 Replies

3. Shell Programming and Scripting

Script is showing abnormal behavior...

Hi, facing unusual problem, below are 2 same scripts, one is working and other is not. please help --- THIS SCRIPT IS WORKING FINE!!!! #! /bin/sh phone=`grep "<phone>" data.xml | sed 's:<phone>::;s:</phone>::'` echo "Phone Number is:"$phone repnum=554156 cat data.xml | sed -e... (3 Replies)
Discussion started by: Prateek007
3 Replies

4. Shell Programming and Scripting

bash script for showing last users

Hi! I'm new in scripting and I need some help with one simple script. I have to write a program that shows in a predetermined period (using "last" command), to draw up a list of users who have used the machine during this period. Each user to indicate how many sessions it has been during this... (9 Replies)
Discussion started by: vassu
9 Replies

5. Shell Programming and Scripting

Script for showing only selected nodes

Dear all, I am bit confused lately, I have a xmlfile here: file: book.xml <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> ... (2 Replies)
Discussion started by: penyu
2 Replies

6. Ubuntu

FAQ adding rules in udev for my usb 8G to autorun rsync

Hi, I would like to ask if someone knows and show/point me or simple help me how udev rules work in lucyd, upon my quest and search all the tuts i used is based on old udev since something i read the udev change in lucyd version.. I want to accomplised when i plug my usb 8Gb device and automount... (0 Replies)
Discussion started by: jao_madn
0 Replies

7. Shell Programming and Scripting

user attributes not showing when I run the script

I am new to linux/unix scripting and working in one company on linux project. I got a script that when it executes should give us the users atributes showing who is retriving data? the script should show us who are the users reriving information. I ran that script as sudo ./test4 but finding the... (0 Replies)
Discussion started by: starter2011
0 Replies

8. Red Hat

USB HDD not showing valid partition on one Solaris machine

Hi All, We have got a USB HDD with important data in it. The data has been copied to the disk(formatted ext3) via a LINUX system. The data was supposed to be copied to a second LINUX machine. Surprisingly, it doesn't show up any valid partitions in the new box. dmesg: usb1-3:... (2 Replies)
Discussion started by: Bikash Mishra
2 Replies

9. Shell Programming and Scripting

Script showing incorrect output

Hello scripting geeks, I am new to scripting and facing some issues in writing the logic of the script. Request your kind help here Actually when i run a command i get o/p as below o/p : 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 these are hex values i guess...now i want to... (15 Replies)
Discussion started by: kulvant29
15 Replies

10. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies
YPXFR(8)						    BSD System Manager's Manual 						  YPXFR(8)

NAME
ypxfr -- transfer NIS database from remote server to local host SYNOPSIS
/usr/libexec/ypxfr [-f] [-c] [-d target domain] [-h source host] [-s source domain] [-p path] [-C taskid program-number ipaddr port] mapname DESCRIPTION
The ypxfr utility copies an NIS database (or map) from one NIS server to another using NIS services. In FreeBSD, ypxfr is generally invoked by ypserv(8) when it receives a map transfer request from yppush(8). The ypxfr utility is used primarily in environments where several NIS servers are in use in a single domain. One server, the NIS master, maintains the canonical copies of all NIS maps, and all the other servers, the NIS slaves, copy new versions of the maps from the master whenever any updates are made (i.e., when a user updates their pass- word via yppasswd(1)). When run, ypxfr creates a temporary database file in /var/yp/[domainname], and fills it with the contents of mapname as supplied by the spec- ified source host. When the entire map has been transferred, ypxfr deletes the original copy of mapname and moves the temporary copy into its place. When the transfer is complete, ypxfr will attempt to send a 'clear current map' request to the local ypserv(8) process to clear any possible references it may still have to the stale map. Note that all files created by ypxfr are owner readable and writable only for security reasons. Since the NIS maps and the directory in which they reside are normally owned by root, this prevents non-privileged users from making unauthorized modifications. In order to maintain consistency across all NIS servers, ypxfr can be run periodically in a cron(8) job. Maps which change infrequently need only be updated once a day (preferably late at night when system usage is lowest), whereas those that are subject to frequent changes (such a passwd.byname and passwd.byuid) should be updated perhaps once every hour. Using cron(8) to automatically update the NIS maps is not strictly mandatory since all updates should be propagated by yppush(8) when /var/yp/Makefile is run on the NIS master server, however it is good practice on large networks where possible outages could cause NIS servers to fall out of sync with each other. When ypxfr is invoked without a controlling terminal, e.g. from inside ypserv(8), it logs all its output using the syslog(3) facility. NOTES
The FreeBSD version of ypxfr has support for a special map transfer protocol which works in conjunction with the FreeBSD rpc.ypxfrd(8) server. This protocol allows it to transfer raw map database files from the NIS master server and can be many times faster than the standard transfer method, particularly for very large NIS maps. The ypxfr utility will check to see if the rpc.ypxfrd(8) server is registered on the NIS master server and attempt to use it if it is present. If it is not it will fall back to the standard transfer method, copying the map contents from ypserv(8) and creating new maps instead. Note that while the FreeBSD ypxfrd protocol is conceptually similar to the SunOS ypxfrd protocol, the FreeBSD protocol is not compatible with Sun's, therefore it will not work with Sun's ypxfrd server. FreeBSD slave systems can still transfer maps from any non-FreeBSD NIS server, however they will only be able to take advantage of the faster protocol if the master server is also running FreeBSD. OPTIONS
The following options and flags are supported by ypxfr: -f Force a map transfer. Normally, ypxfr will not transfer a map if it determines that the NIS master's copy is not newer than the existing copy already on the local host: the -f flag forces a transfer regardless of which server's version is more recent. -c Do not send a 'clear current map' request to the ypserv(8) process running on the local host. This flag is normally used when invok- ing ypxfr manually on a machine that is not yet running ypserv(8). Without this flag, failure to contact the local NIS server will cause ypxfr to abort the transfer. -d target domain Specify a target domain other than the current NIS domain. -h source host Specify the name of the host from which to copy the NIS maps. This option is used to ensure that ypxfr only copies maps from the NIS master server. -s source domain Specify the domain from which to transfer a map, in the event that the transfer is being done across two different NIS domains. -p path Specify the top level directory containing the NIS maps. By default, this path is /var/yp. The -p flag allows you to specify an alternate path should you wish to store your NIS maps in a different part of the file system. The NIS server, ypserv(8), passes this flag to ypxfr if it too has been told to use an alternate path. -C taskid program-number ipaddr port These options are used only when ypxfr is invoked by ypserv(8) in response to a map transfer request initiated by yppush(8). In this instance, ypxfr needs to 'callback' to the yppush(8) process and interact with it, so yppush(8) passes to it an IP address ipaddr, port number port, registered program number program-number and a transaction ID taskid that it can use to contact the waiting yppush(8) process on the master server. mapname The name of the map to transfer. FILES
/var/yp/[domainname]/[maps] The NIS maps for a particular NIS domain. SEE ALSO
yp(8), yppush(8), ypserv(8) AUTHORS
Bill Paul <wpaul@ctr.columbia.edu> BSD
February 5, 1995 BSD
All times are GMT -4. The time now is 01:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy