Sponsored Content
Full Discussion: Help with rsync script
Top Forums Shell Programming and Scripting Help with rsync script Post 302568168 by ygemici on Wednesday 26th of October 2011 12:56:18 PM
Old 10-26-2011
Quote:
Originally Posted by Noura-83
It gave me exactly the same output Smilie
your output is only this?
Code:
SIDid A
A is : A2 A22222 A24444 A29999
building file list ... done
./

why do you use the spaces in directory names in your rsync command?
you want to transfer only A1* files others skipped,do I understand correctly what you do?

this code is working for skip all files exclude A1* to N2 directory..
Code:
# cat s
#!/bin/ksh
SIDid="A"
echo SIDid $SIDid
A="$SIDid"2*
echo A is : $A
 
/usr/bin/rsync -avz --ignore-errors /home/noura/SBt/N1/ --include="${SIDid}1*" --exclude='*' /home/noura/SBt/N2

Code:
# ./s
SIDid A
A is : A2 A22222 A24444 A29999
building file list ... done
./
A1098776
A12222
A1234455
A13333
A18888
sent 313 bytes  received 136 bytes  898.00 bytes/sec
total size is 0  speedup is 0.00

regards
ygemici
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync script in cron from stepping on itself

I have the following rsync script that I use for syncing MySQL files from one server to another. I run the script at 20 minutes past every second hour in cron. I want to make sure that the script completes in it's entirety before it is set to kick off again. For example, when the script starts at... (3 Replies)
Discussion started by: sunsysadm2003
3 Replies

2. Shell Programming and Scripting

rsync script ...

Hi all, I am a newbie in unix and i want a script which should sync files between two servers like rsync. The condition is that. after rsync command is completed it should also list me how many files has been changed during the rsync execution. if the rsync execution has failed , then... (2 Replies)
Discussion started by: abalakrishnan
2 Replies

3. Shell Programming and Scripting

rsync - storing password in script

Hello, I wish to store the password in an rsync script so that when prompted it just enters the password. I know I can set up passwordless logins, but I have never been able to do this on this particular server so I am resorting to storing the password in the script: rsync -avz -e ssh... (4 Replies)
Discussion started by: stuaz
4 Replies

4. Shell Programming and Scripting

rsync script for synchronisation and backup

hello, i need to modified my synch/back scripts.... i want that this script only syncro folders in destinationfolder. f.e. when in destination are two folders 1) admin 2) users but in SOURCE are three: 1) admin 2) users 3) antivirus the script should only increnmential sync the... (0 Replies)
Discussion started by: onkeldave
0 Replies

5. Shell Programming and Scripting

Help with changing rsync script

#/bin/bash #set -vx DST_SRV=<destination_hostname> MDATE=`date +%Y%m%d%H%M` SRC_CONTENT="/home/prad/sourcecontent/" DST_CONTENT="/tmp/prad/destinationfolder/" DST_LOG="/tmp/prad/STATS" CURRENT_LOG="/home/prad/STATS/rsync-current.log" EMAIL="/home/prad/EMAIL/email.log"... (3 Replies)
Discussion started by: pnara2
3 Replies

6. UNIX for Advanced & Expert Users

Rsync Script Modification

Hi I have a rsync that runs from a remote location to our central data store. The sync generates a log locally not in the central location. I would like to modify the rsync to add the following The log, instead of filing locally it gets sent to a area on the central data store once the syncs... (0 Replies)
Discussion started by: treds
0 Replies

7. Shell Programming and Scripting

Help with rsync script

Good day all, I need your help in editing a rsync script that I am trying to write and using ksh shell. I want to add multiple patterns --include and --exclude options with variable inputs called SID. I have created two files and named them N1 and N2 and created subfiles in each one In N1... (1 Reply)
Discussion started by: Noura-83
1 Replies

8. Shell Programming and Scripting

Cp script like rsync

Hi Folks, I have a NAS running busybox with a ARM processor. Several PC's backup full weekly and several daily incrementals to the NAS. The NAS has two USB attached disks, which are swapped off site weekly. The problem is the built in rsync only transfers at 2Mb/s to the external USB... (2 Replies)
Discussion started by: bigal.nz
2 Replies

9. Shell Programming and Scripting

Help with rsync file restore script

Hello Friends, I am trying to create an rsync file restore script. I will post want I have below and explain the problem I am having. #!/bin/bash # # Partial Rsync File Restore Script # # clear echo # Shell loads into /raid0/data/backup/bin/ cd .. # I cd to the backup... (1 Reply)
Discussion started by: jdavis_33
1 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
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 10:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy