Rsync temporary files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Rsync temporary files
# 1  
Old 02-21-2011
Rsync temporary files

Hi,

I am looking to use rsync in a very specific way, and even though I have trawled the rsync man pages I have not succeeded in seeing a way of doing the following:

  1. The temporary files created by rsync should not be created in the destination directory. (I have used --temp-dir option to do this)
  2. Files that have been copied over to the temporary directory, are then moved to the destination directory, deleting any file with the same name first.
The reason for these very particular requirements, is that I have inotifywait monitoring the destination directory and watching for the "create" event (not the modified).

Can anyone help with 2?

Thanks,
LITW
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can cygwin rsync handle temporary network outages?

We're using Deltacopy's distribution of Cygwin Rsync (v3.0.4, I believe) to backup two large Virtualbox virtual hard drives from our work Windows 7 VM host, over the internet through Logmein Hamachi VPN, to an XP PC in my boss's basement. I have rsync running in a batch file which monitors the... (1 Reply)
Discussion started by: scottgus1
1 Replies

2. Homework & Coursework Questions

Help with exit, grep, temporary files, awk

1. The problem statement, all variables and given/known data: I do not understand how/why the following code is used. Please do not simply refer me to the man pages since I have already reviewed them extensively. Thank you. exit 2 , exit 3, exit 0 I understand the basics of why the exit... (5 Replies)
Discussion started by: BartleDoo
5 Replies

3. AIX

Hidden temporary files in AIX

Hi, Some porocess is creating hidden temporary files in /tmp directory. And they are not getting deleted. System is going out of disk space after some days. The temp files are getting created like .<user name><pid>. I have checked the application code, but didnt get any clue. Does these files... (4 Replies)
Discussion started by: viswath.sen
4 Replies

4. UNIX for Advanced & Expert Users

Which time should be used for deleting temporary files?

I want to create a folder for users to put their temporary files and a folder for users to put their permanent files. For the temporary folder, I need to implement a deletion policy. I would like to know normally which time, ctime, mtime or atime, should be used to implement such deletion policy. (1 Reply)
Discussion started by: marctc
1 Replies

5. Shell Programming and Scripting

Help - Bug: A script to compile two types of data files into two temporary files

Dear other forum members, I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong. Please help me. I just started to learn about bash scripting, and I appreciate if anyone of you can point out my errors. I thank you in advance. ... (3 Replies)
Discussion started by: ilove2smoke
3 Replies

6. Shell Programming and Scripting

Writing files without temporary files

Hey Guys, I was wondering if someone would give me a hand with an issue I'm having, let me explain the situation: I have a file that is constantly being written to and read from with updated lines: # cat activity.file activity1 activity2 activity3 activity4 activity5 This file... (2 Replies)
Discussion started by: bashshadow1979
2 Replies

7. Shell Programming and Scripting

Temporary files and rm

Hello everyone, I am creating a temporary file in my ksh by using something file filetemp=filetemp.$$ Later on in my script I write to the file $filetemp by 'cat'ing to it. Then in the script I am doing a 'less' on the file to view it. At the end of the script I issue a rm $filetemp 2>... (4 Replies)
Discussion started by: gio001
4 Replies

8. Ubuntu

Avoid creating temporary files on editing a file in Ubuntu

Hi, My ubuntu flavor always create temporary files having filename followed by ~ on editing. For eg: if I am editing a file called "sip.c", automatically a temporary (bkup) file is getting created with the name "sip.c~". How to avoid this file creation? (7 Replies)
Discussion started by: royalibrahim
7 Replies
Login or Register to Ask a Question
LSYNCD(1)							      Lsyncd								 LSYNCD(1)

NAME
lsyncd - a daemon to continuously synchronize directory trees SYNOPSIS
config file *lsyncd* [OPTIONS] CONFIG-FILE default rsync behaviour *lsyncd* [OPTIONS] -rsync SOURCEDIR TARGET ... default rync+ssh bevahiour (moves and deletes through ssh) *lsyncd* [OPTIONS] -rsyncssh SOURCEDIR TARGETHOST TARGETDIR ... default direct bevahiour (local file operations/rsync) *lsyncd* [OPTIONS] -direct SOURCEDIR TARGETDIR ... DESCRIPTION
Lsyncd(1) watches local directory trees through an event monitor interface (inotify, fsevents). It aggregates and combines events for a few seconds and then spawns one or more processes to synchronize the changes. By default this is rsync(1). Lsyncd is thus a light-weight asynchronous live mirror solution that is comparatively easy to install not requiring new filesystems or blockdevices and does not hamper local filesystem performance. Rsync+ssh is an advanced action configuration that uses a SSH(1) to act file and directory moves directly on the target instead of retransmitting the move destination over the wire. Fine-grained customization can be achieved through the CONFIG-FILE. Custom action configs can even be written from scratch in cascading layers ranging from shell scripts to code written in the LUA(1) language. This way simplicity can be balanced with powerfulness. See the online manual for details on the CONFIG-FILE http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual Note that under normal configuration Lsyncd will delete pre-existing files in the target directories that are not present in the respective source directory. OPTIONS
-delay SECS Overrides the default delay times. -help Show a help message. -insist Continues startup even if a startup rsync cannot connect. -log LEVEL Controls which kind of events are logged. By default Lsyncd logs Normal and Error Messages. -log scarce will make Lsyncd log Error messages only. -log all will log all debug messages. -log Category Turns on a specific debug message. E.g. -log Exec will log all processes as they are spawned. -nodaemon Lsyncd will not detach from the invoker and log as well to stdout/err. -pidfile FILE Lsyncd will write its process ID in FILE. -runner FILE Makes the Lsyncd core load the part of Lsyncd written in Lua from FILE. -version Writes version information and exits. EXIT STATUS
0 Terminated on a TERM signal(7) -1 Failure (syntax, unrecoverable error condition, internal failure) SEE ALSO
Online Manual: http://code.google.com/p/lsyncd/wiki/Lsyncd2 VERSION
This man page is for lsyncd(1) version 2.0.5 AUTHOR
Axel Kittenberger, <axkibe@gmail.com> 2010-2011 COPYING
Copyright (C) 2010-2011 Axel Kittenberger. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 2, or any later version. Free redistrubition of this Documentation (/doc directory) is granted under the terms of the Creative Commons 3.0 Attribution License (CC-3.0-BY). Lsyncd 2.0.6 August 2011 LSYNCD(1)