Sponsored Content
Top Forums Shell Programming and Scripting rsync question (regarding --delete) Post 302365641 by peterro on Tuesday 27th of October 2009 05:11:40 PM
Old 10-27-2009
Does your version of rsync have a -n switch to perform a dry-run? From the man page:

Quote:
--delete
...
This option can be dangerous if used incorrectly! It is a very good idea to run first using the dry run option (-n) to see what files would be deleted to make sure important files aren?t listed.
...
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

rsync with the --delete option.

Tell me this - set me straight! the --delete option says "delete files that don't exist on the sending side" Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (2 Replies)
Discussion started by: sallender
2 Replies

2. UNIX for Dummies Questions & Answers

rsync with the --delete option

Tell me this - set me straight! The --delete option says "delete files that don't exist on the sending side" Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (1 Reply)
Discussion started by: sallender
1 Replies

3. Shell Programming and Scripting

Bash rsync but move not delete

There might be an easy solution to my problem, or maybe not, but here it is. I am trying to rsync a Volume with 1.5 terabytes of data and send it via fibre channel to a raid array. Now normally when I rsync it scans through everything and, before copying anything, deletes any files that have... (1 Reply)
Discussion started by: Movomito
1 Replies

4. Shell Programming and Scripting

Rsync help - unable to delete the Source file

Hi All, I am facing problem deleting Source while using the rsync command. rsync --include=*`date --date="-1 day" \+\%Y\%m\%d`* --include=*`date +\%Y\%m\%d`* --exclude=* --delete-after -auvb -e ssh USER@SERVER:SOURCE DESTINATION However the sync happens but not the deletion of the source... (1 Reply)
Discussion started by: amitkhiare
1 Replies

5. Fedora

rsync --delete

When I try to back up my libraries with rsync -azv --delete -e ssh /home/sarah/ saga:/home/sarah/bupembladaily/ I get error message rsync: readlink_stat("/home/sarah/.gvfs") failed: Permission denied (13) FATAL I/O ERROR: dying to avoid a --delete-during issue with a pre-3.0.7 receiver.... (7 Replies)
Discussion started by: sarahslagstedt
7 Replies

6. Shell Programming and Scripting

Is rsync --delete on some files without write permission possible?

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 Dummies Questions & Answers

Rsync Can I delete .NFS and .fuse files

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

8. Shell Programming and Scripting

Rsync with delete option

Hi, I have restored backup of a directory on one server to another server. But there may be some differences because the date on which backup was taken is 5 days back, so I want to delete the files on target if something is not in sync, but do not want to copy it all, since this is already... (1 Reply)
Discussion started by: solaris_1977
1 Replies

9. UNIX for Advanced & Expert Users

Rsync with --delete but do not delete peer dirs on target

rsync with --delete won't honor the delete if the source is something/*. I want the delete to work, but not to delete directories on the target that are peer to the intended directory. For example, using these source and target file structures: Source on desktop: ~/ Money/ ... (4 Replies)
Discussion started by: JavaMeister
4 Replies

10. UNIX for Beginners Questions & Answers

Move directory with rsync and delete from source

I need a rsync command which will exclude certain files and directories from source and copy the rest. I got this command working, sudo rsync -avzh --exclude 'bin' --exclude 'braintree' --exclude 'colinmollenhour' --exclude 'composer' --exclude 'doctrine' --exclude 'fabpot' --exclude... (2 Replies)
Discussion started by: Siddheshk
2 Replies
HTCACHECLEAN(8) 						   htcacheclean 						   HTCACHECLEAN(8)

NAME
htcacheclean - Clean up the disk cache SYNOPSIS
htcacheclean [ -D ] [ -v ] [ -t ] [ -r ] [ -n ] [ -Rround ] -ppath [-llimit| -Llimit] htcacheclean [ -n ] [ -t ] [ -i ] [ -Ppidfile ] [ -Rround ] -dinterval -ppath [-llimit| -Llimit] htcacheclean [ -v ] [ -Rround ] -ppath [ -a ] [ -A ] htcacheclean [ -D ] [ -v ] [ -t ] [ -Rround ] -ppath url SUMMARY
htcacheclean is used to keep the size of mod_cache_disk's storage within a given size limit, or limit on inodes in use. This tool can run either manually or in daemon mode. When running in daemon mode, it sleeps in the background and checks the cache directory at regular intervals for cached content to be removed. You can stop the daemon cleanly by sending it a TERM or INT signal. When run manually, a once off check of the cache directory is made for cached content to be removed. If one or more URLs are specified, each URL will be deleted from the cache, if present. OPTIONS
-dinterval Daemonize and repeat cache cleaning every interval minutes. This option is mutually exclusive with the -D, -v and -r options. To shutdown the daemon cleanly, just send it a SIGTERM or SIGINT. -D Do a dry run and don't delete anything. This option is mutually exclusive with the -d option. When doing a dry run and deleting directories with -t, the inodes reported deleted in the stats cannot take into account the directories deleted, and will be marked as an estimate. -v Be verbose and print statistics. This option is mutually exclusive with the -d option. -r Clean thoroughly. This assumes that the Apache web server is not running (otherwise you may get garbage in the cache). This option is mutually exclusive with the -d option and implies the -t option. -n Be nice. This causes slower processing in favour of other processes. htcacheclean will sleep from time to time so that (a) the disk IO will be delayed and (b) the kernel can schedule other processes in the meantime. -t Delete all empty directories. By default only cache files are removed, however with some configurations the large number of directo- ries created may require attention. If your configuration requires a very large number of directories, to the point that inode or file allocation table exhaustion may become an issue, use of this option is advised. -ppath Specify path as the root directory of the disk cache. This should be the same value as specified with the CacheRoot directive. -Ppidfile Specify pidfile as the name of the file to write the process ID to when daemonized. -Rround Specify round as the amount to round sizes up to, to compensate for disk block sizes. Set to the block size of the cache partition. -llimit Specify limit as the total disk cache size limit. The value is expressed in bytes by default (or attaching B to the number). Attach K for Kbytes or M for MBytes. -Llimit Specify limit as the total disk cache inode limit. -i Be intelligent and run only when there was a modification of the disk cache. This option is only possible together with the -d option. -a List the URLs currently stored in the cache. Variants of the same URL will be listed once for each variant. -A List the URLs currently stored in the cache, along with their attributes in the following order: url, header size, body size, sta- tus, entity version, date, expiry, request time, response time, body present, head request. DELETING A SPECIFIC URL
If htcacheclean is passed one or more URLs, each URL will be deleted from the cache. If multiple variants of an URL exists, all variants would be deleted. When a reverse proxied URL is to be deleted, the effective URL is constructed from the Host header, the port, the path and the query. Note the '?' in the URL must always be specified explicitly, whether a query string is present or not. For example, an attempt to delete the path / from the server localhost, the URL to delete would be http://localhost:80/?. LISTING URLS IN THE CACHE
By passing the -a or -A options to htcacheclean, the URLs within the cache will be listed as they are found, one URL per line. The -A option dumps the full cache entry after the URL, with fields in the following order: url The URL of the entry. header size The size of the header in bytes. body size The size of the body in bytes. status Status of the cached response. entity version The number of times this entry has been revalidated without being deleted. date Date of the response. expiry Expiry date of the response. request time Time of the start of the request. response time Time of the end of the request. body present If 0, no body is stored with this request, 1 otherwise. head request If 1, the entry contains a cached HEAD request with no body, 0 otherwise. EXIT STATUS
htcacheclean returns a zero status ("true") if all operations were successful, 1 otherwise. If an URL is specified, and the URL was cached and successfully removed, 0 is returned, 2 otherwise. If an error occurred during URL removal, 1 is returned. Apache HTTP Server 2010-11-20 HTCACHECLEAN(8)
All times are GMT -4. The time now is 03:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy