rsync question...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rsync question...
# 1  
Old 11-24-2009
rsync question...

hi all,

i didnt know where to place the question on this site but seen as though it relates to a script i have done so here...

my issue is this...

i have 2 servers.

On server 1 (master) I have a structure such as /home/test/folder1,/home/test/folder2 and /home/test/folder3.

On server 2 I have the same structure.

However on server 2, I run rsync to fetch the root folder 'test' from server 1 and update an exclude file with paths test/folder1/fileA, test/folder1/fileA,...

When I run rsync on server 2, the verbose shows it pulling files from 'test/XXX' etc...however what I see each time I run rsync is that all files keep being copied across instead of the latest files from each of folder1,folder2 and folder3 despite me supplying an exclude file....Smilie

I have supplied an exclude-from command to the rsync command but I cant seem to prevent rsync from fetching every file each time the rsync command runs (configured to run every min).Smilie

Do I need to change the exclude-from command to be a specific path? such as /home/test/folder1/fileA* etc instead of test/folder1/fileA etc?

Any help appreciated.

rsync command:
rsync --exclude-from=</pathtofile> ....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Script Question (find, rsync)

Hello all, I'm using rsync to maintain two copies of a music library on my main workstation and a server running MPD. I'm wondering about using the script below as a basis for cron to update my MPD db if new files have been added or existing files modified: find -type f -iname 'FILENAME' -mmin... (9 Replies)
Discussion started by: pmicka
9 Replies

3. UNIX for Dummies Questions & Answers

rsync usage question

Hello folks; I'm using rsync on my Ubuntu servers to sync a remote folders on a remote machine to a local folders on a local machine. one thing i couldn't get to work is how to exclude folder. I know i'm suppose to use "exclude" argument but every time i do, i still see the excluded directory... (0 Replies)
Discussion started by: Katkota
0 Replies

4. Shell Programming and Scripting

rsync question (regarding --delete)

Hi there Does anybody know of a way that i can, instead of issuing a --delete when syncing one directory to another, I can instead somehow receive a list of what would be deleted, but not actually delete it ? basically, people are occasionally putting files into one of synced folders, but... (2 Replies)
Discussion started by: rethink
2 Replies

5. UNIX for Dummies Questions & Answers

Simple Rsync question

I have a folder on a server that I update from different machines. So I think Rsync sounds like a good solution but I'm not sure how to make it a bidirectional check for updating, because if I work on the file on one of my client machines it could be newer than the server. (2 Replies)
Discussion started by: elbombillo
2 Replies

6. UNIX for Dummies Questions & Answers

Rsync question....

I have folders that sync over the network with an external software. I would like to know if rsync can be used to only sync permissions on files on the files. Remember I just want the permissions on the source to be copied over to the destination's already synced files. (2 Replies)
Discussion started by: elbombillo
2 Replies

7. UNIX for Advanced & Expert Users

rsync incremental question

Hi, I have problem with incremental copy of files from source to destination. I would like to copy different sources to different destinations. I made a backup script which look like that: curd=$(date +%w) day=$(date +%A) mkdir -p /home/backup/DATA/$day case $curd in 1|2|3|4|5) ... (7 Replies)
Discussion started by: zhivko.neychev
7 Replies

8. UNIX for Advanced & Expert Users

rsync question

Hey there guys I'm trying to rsync up a subdirectory only. For example /Volumes/media/WebDocuments/2006/* but not /Volumes/media/WebDocuments/2007/* rsync -va /Volumes/media/WebDocuments/2006/ \ user@host:/backups/2006/ If I do it that way I get only the contents... (3 Replies)
Discussion started by: sidmuchrock
3 Replies

9. UNIX for Dummies Questions & Answers

rsync question

Hi All I am trying to rsync the directories between two servers. The source directory is huge (8 GB) and I have the need to take an offsite backup. The directory I am trying to rsync has 774 permissions and are owned by a user/ group. To startup I backed up the source directory and restored... (1 Reply)
Discussion started by: skotapal
1 Replies

10. IP Networking

rsync question?

Does anyone know if rsync will work without ssh or rsh? I am trying to use rsync to synchronize files on two servers, one a production server and the other a standbyserver. The problem is that I have't been given the ok to install openssh on our productions servers, so I am trying to make my job... (4 Replies)
Discussion started by: cstovall
4 Replies
Login or Register to Ask a Question
slack(8)						      System Manager's Manual							  slack(8)

NAME
slack - Sysadmin's lazy autoconfiguration kit SYNOPSIS
slack [option ...] [role ...] DESCRIPTION
slack is a master command which coordinates the activities of its backends, which variously: o determine the list of roles to be installed on this server o create a local cached copy of the role files from the central repository o merge file trees from subroles into a single, unified tree o install files onto the local filesystem o run scripts before and after installation Options you give to slack will be generally passed along to the backends where relevant. OPTIONS
-h, --help Print a usage statement. --version Print the version and exit. -v, --verbose Increase verbosity. Can be specified multiple times. --quiet Don't be verbose (Overrides previous uses of --verbose). -C, --config FILE Use the specfied FILE for configuration instead of the default, /etc/slack.conf. -s, --source DIR Source directory for slack files -e, --rsh COMMAND Remote shell for rsync -c, --cache DIR Local cache directory for slack files -t, --stage DIR Local staging directory for slack files -r, --root DIR Root destination for slack files --no-sync Skip the slack-sync step (useful if you're pushing stuff into the CACHE outside slack). --no-files Don't install any files in ROOT, but tell rsync to print what it would do. --no-scripts Don't run scripts -n, --dry-run Same as --no-files --no-scripts (CACHE, STAGE will still be updated) --role-list Role list for slack-getroles(8). -b, --backup Make backups of existing files in ROOT that are overwritten. This option defaults to on if it is not set to 0 in a config file or disabled with --nobackup on the command line. --backup-dir Put backups from the --backup option into this directory. -H, --hostname HOST Pretend to be running on HOST, instead of the name given by gethostname(2). --preview MODE Do a diff of scripts and files before running them. MODE can be one of 'simple' or 'prompt' (See PREVIEW MODES, below). --diff PROG Use this diff program for previews. --sleep TIME Randomly sleep between 1 and TIME seconds before starting operations. Useful in crontabs. PREVIEW MODES
Preview functionality is new in slack 0.14.0. I haven't quite worked out how things will work, so this usage is somewhat subject to change in future versions. I thought I would try it this way and see how people like it. In 'simple' mode, after syncing and staging the files directory, slack will present a diff of the files and scripts. In this mode, slack will not run the preinstall or fixfiles scripts, and because of this, it may provide some false output about permissions changes to files. In 'prompt' mode, after syncing and staging the files directory, slack will diff the script directory. If there are differences, slack will present them to you and ask you if you want to continue. If you say no, it will exit. If you say yes, it will stage the scripts directory, run the preinstall and fixfiles scripts, and then diff the files in the stage with those in the root. If there are differences, slack will present them to you and ask you if you want to continue. If you say no, it will exit. If you say yes, it will install the files and run the postinstall script. So, the 'simple' mode is easy to use, and will be accurate if you don't use fixfiles. The 'prompt' mode will be accurate if you use fix- files, but requires some interaction. Why can't we just have one mode that works with fixfiles and requires no interaction? Well, that would require slack to understand what your free-form fixfiles executable was going to do, which would either require some kind of universe simulator or would require you to write your fixfiles in a less free-form way, which would make slack less like slack. EXAMPLES
To install all the roles configured in the role list for a server: slack To install a specific role: slack rolename To test a new role before checking in the changes: slack --source user@workstation:/home/user/.../slack rolename To avoid killing your master server when calling from cron: slack --sleep 3600 FILES
/etc/slack.conf SEE ALSO
slack.conf(5), rsync(1) Administrative commands 2004-10-22 slack(8)