07-05-2017
Rsync - delete extra files in Destination without synchronising directories
I have a script that synchronises a directory to a DR server, but to improve the time, I actually use rsync to transfer files *[123] in one batch and also
*[456] in another batch - both batches run from the same script and run in the background.
My problem is that there isn't much space on the Destination, so I would like to start by deleting any files on there that don't exist on the Source.
Is there any way to delete files on the Destination that don't exist on the Source only i.e. without synchronising the files?
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello friends,
I am compiling some set of SQL scripts in a set of sub directories demoed as below. After compiling log files are being created.
Each and every time after compiling time I had to go subdir by subdir to delete the log files. I am sure there should be simple way to look for all log... (4 Replies)
Discussion started by: adurga
4 Replies
2. UNIX for Advanced & Expert Users
Dear Folks,
I have to backup pgsql database dump everynight on a routine. The database dump actually contains sql(text) statements. The actual size of the database dump is aroung 800 MB. Between two days backup, only few lines of statements are modified/added/deleted.
I dont want to do... (1 Reply)
Discussion started by: rssrik
1 Replies
3. Shell Programming and Scripting
Hi everyone, and thanks to all for your assistance.
I have a problem with the rsync command. I want to make a backup of a "source" directory in a "destination" directory.
I want to specify:
"absolute path of destination" (identified by a ~): ~/Destination
or a "relative path of... (0 Replies)
Discussion started by: PaganoM
0 Replies
4. Shell Programming and Scripting
Hi,
I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders.
Instead of running rsync command multiple times for each file, can we achieve this with one time execution?
your help is much... (0 Replies)
Discussion started by: MVEERA
0 Replies
5. Shell Programming and Scripting
I've got a rsync script that backups file from disk1 to disk3. This works great however if there are extra files on disk3 they do not get deleted by the sync.
I'm syncing all folders from F-J
rsync --progress -v --delete --delete-excluded -av --recursive /home/disk1/Files/*... (0 Replies)
Discussion started by: gmccarthy
0 Replies
6. Shell Programming and Scripting
Hello all,
I have a problem with rsync command.
From a backup server, I use a command like the one below:
rsync -av --delete user@host:/home/user/ /home/backup_user/daily_rotating_backup/
In some folders of the user there are some files on which he has removed his write permission on... (3 Replies)
Discussion started by: freddie50
3 Replies
7. UNIX for Advanced & Expert Users
hi All,
i have 2 server setup now for Rsync, i configured Rsync on both of the server and it worked well when i did run from source to destination. and while running back from destination to source it produced this error:
bash-3.2$ ksh rsync_bravo_db.ksh usa0300uz1247.apps.mc.xerox.com... (0 Replies)
Discussion started by: lovelysethii
0 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I have some files in a local directory and perform an rsync command with the files in a remote directory, Now when I checked the files in the local and the remote directory, I found some strange filetypes such as this: .nfs0000000001d0c8e000002ff2 , .fuse_hidden000014da00000001 etc etc,... (3 Replies)
Discussion started by: ajayram
3 Replies
9. Shell Programming and Scripting
OS: SUNOS 5.10 i386
Hello guys I wrote a shell script in bash shell to delete the files less than 30 days old. The following is the script.
=======================================
#!/bin/bash
for dirs in `/clu04/oracle/directory_list.lst`
do
find $dirs -type f -mtime -30 -exec rm {} \;... (3 Replies)
Discussion started by: zacsparrow
3 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
I want delete all files from destination folder. I am trying below commands
rsync -avFF --delete-after /home/vizion/source/ /home/vizion/destination/
I need to be delete all file/fodders from destination
Any body have idea ? Please correct me. (3 Replies)
Discussion started by: Chenchireddy
3 Replies
LEARN ABOUT DEBIAN
uucpsend.ctl
UUCPSEND.CTL(5) Administration UUCPSEND.CTL(5)
NAME
uucpsend.ctl - list of sites to feed via uucpsend
DESCRIPTION
The file /etc/news/uucpsend.ctl specifies the default list of sites to be fed by uucpsend(8). The program is able to read site information
from other related configuration files as well.
Comments begin with a hash mark (``#'') and continue through the end of the line. Blank lines and comments are ignored. All other lines
should consist of six fields separated by a colon. Each line looks like
site:max_size:queue_size:header:compressor:args
The first field site is the name of the site as specified in the newsfeeds(5) file. This is also the name of the UUCP system connected to
this site.
The second field max_size describes the maximum size of all batches in kbytes that may be sent to this site. If this amount of batches is
reached, this site will not be batched with this run and a reason will be logged into the logfile. This test includs all UUCP jobs, not
only the ones sent to rnews (performing ``du -s'').
The third field queue_size specifies the maximum size in kbytes of one batch. This argument is passed directly to batcher(8).
The fourth field header defines the text that shall appear in the command header of every batch file. `#! ' is prefixed each batch. Nor-
mally you'll need cunbatch for compress, gunbatch or zunbatch for gzip. This header is important since there is not standard way to handle
gzip'ed batches. Using this and the next argument you're also able to use any compressor you like. So you receive a certain amount of
flexibility by using uucpsend. If you don't want to have any compression leave the field empty.
The fifth field compressor names a program that reads from stdin and writes to stdout. Normally it modifies the input stream by compress-
ing it, such as compress(1) or gzip(1).
The sixth field args consists of additional arguments that are passed directly to uux when sending the batch.
One entry in the main configuration file is mandatory. There must exist a line containing the default values for all these variables. To
achieve this the pseudo site /default/ is used.
One default entry could look like this:
/default/:2000:200:cunbatch:compress:-r -n
This reflects a minimal setup. The maximal size that may be used by the UUCP spool directory is 2MB. Each batch will be max. 200 kBytes
big. The header of each batch will contain the string `cunbatch' and compress(1) is used to compress the batches. `-r -n' is passed to
uux(1) which means no notification will be sent if uux was successful and uux won't start the uucico(8) program when spooling the file.
HISTORY
Written by Martin Schulze <joey@infodrom.org> for InterNetNews. Most of the work is derived from nncpsend.ctl(5) by Landon Curt Noll
<chongo@toad.com> for InterNetNews.
SEE ALSO
batcher(8), newsfeeds(5), uucpsend(8), uux(1).
Infodrom 21 November 2001 UUCPSEND.CTL(5)