General :: Rsync Not Deleting Files On Target

Sep 8, 2010

I'm using the command below to sync two directories. Problem is insted of deleting the files on the target directory it simply appends a ~ character at the end of the file name. Not sure why this is happening?I'd like to have all deletes on the source replicated on target.

View 2 Replies


ADVERTISEMENT

General :: Rsync Deleting Files From Destination Directory?

Jul 14, 2011

We have an rsync cron job set up to mirror all the files in a "..dashtdocsdocs" folder to the same folder on another server. It copies all the files over correctly and deletes any files in the "docs" directory that aren't in the sending directory, but it also deletes any files we put in the target directory's parent folder (..dashtdocs or other subfolders like ..dashtdocsimages) even though they've been excluded in the .rsync-filter file.

Here's our current rsync .sh:

/usr/local/bin/rsync --stats -qPzrtpl --delete --password-file=/var/run/.appprodrsync --log-file=/export/home
/webuser/logs/rsync-extranet-log -FF /export/home/ appprodrsync@appprod::dprweb_extranet/ > /export/home/webuser/logs/rsync-extranet-output 2>&1

[code]....

So for example server A has ..dashtdocsdocs and ..dashtdocsimages. Server B has ..dashtdocsdocs but if I manually copy the images folder over to ..dashtdocsimages, the images folder gets deleted from the target directory every time rsync runs.

A: ..dashtdocsdocs
..dashtdocsimages
B: ..dashtdocsdocs
..dashtdocsimages (<-- gets deleted everytime rsync runs)

I'd like to keep just the docs directory synched and update other folders manually, but they keep getting deleted. It looks to me like it's running a delete-excluded option, but that option wasn't used.

View 2 Replies View Related

OpenSUSE :: Way To Get Rsync To Delete Files If They Were Deleting At Source?

Jun 11, 2011

I have 2 folders that are synced using rsync. Right now if I delete a file in the source folder, the destination folder still retains that file. Is there a way to get rsync to delete files if they were deleting at the source?I could not find anything in the man page.not sure if I'm missing something or if that feature just doesn't exist.

View 4 Replies View Related

General :: Shell Script For Identifying The File And Zip All Files, Move The Files To Target Dir?

May 7, 2011

1. Every Sunday2. Find all files older than 1 day3. Gzip these file4. Tar up the gzipped files into one tar file.5. Name the tarball with a date stamp indicating what day it was created, so we know that week's files are in the file

View 3 Replies View Related

Software :: Run Rsync To Download Files From A Server Without Rsync Daemon?

Sep 18, 2009

I just tried to sync files from one server to another. After the sync process, I found the files are bigger than original ones.

I looked up the web and found someone mentions the rsync daemon. So I have to run the daemon on one server before I run the rsync?

The command I used is rsync --partial --progress -r source destination

View 1 Replies View Related

Server :: Rsync Can Not Rsync Files With Include Filter

Jul 21, 2010

use rsync to cp such files and dirs under /var/www/html/mydir directory but these two files(/dir4/1.html /dir4/2.html) cant rsync to dest mechine.

rsync configure file,below...

View 2 Replies View Related

General :: Deleting Iframes From Files

Apr 25, 2009

my website was recently infected with this stupid malware lotultimatebet .cn...there is a hidden iframe on almost all the 6000 pages of my site.can you please advise, if it is possible for me to remove this line from all pages by executing some command?

View 1 Replies View Related

General :: Deleting All Files From Directory Except For Two

Nov 25, 2010

I'm writing a Perl script which performs linux commands.I have a directory with a load of files.

Code:exec_cmd('rm $(ls * | grep -v file1)');
This command will delete all except for file1. How can I modify this to delete all files except for file1 & file2?

View 2 Replies View Related

General :: Deleting Files By Date

Nov 5, 2009

I had a program run riot and it has created hundreds of spurious files in one directory. Fortunately they are all dated 4th November so are easily identified. What bash command can I use from the console to delete them all?

View 2 Replies View Related

General :: Deleting Files Older Than 1 Hours

Sep 8, 2009

on my site now I'm using cache and need me cron script that will delete files older than 1 hour I have feature in my kloxo control panel just need me the command .

View 2 Replies View Related

General :: Deleting Lines From Text Files

Sep 17, 2009

Is there anyway to delete certain paragraphs within a text file and then insert the paragraph into another text file.I just cannot figure out how to remove the specific lines from the file and then insert them into another file at a certain line within that new file. Thanks again

View 10 Replies View Related

General :: How To Delete All Files In Directory Without Deleting?

Feb 9, 2010

I know that rm -i will prompt wether you want to delete each file.But rm -i -r will prompt for each file in each subdirectory recursively. How to make it prompt just for the directory itself, and then delete its contents without asking?How to delete all the files in a directory without deleting . and ..?How to recursively delete all tilde files in a directory?How to GUI file managers delete files to Trash? Where is this "Trash" located? Can you delete to trash in the command line?

View 14 Replies View Related

General :: Deleting Files On USB - Input / Output Error

May 4, 2009

[root@localhost media]# ls UMESH
[root@localhost media]# cd UMESH/
[root@localhost UMESH]# ll
ls: cannot access ejb: Input/output error
total 0 d? ejb
[root@localhost UMESH]# rm -rf ejb
rm: cannot remove 'ejb': Input/output error
[root@localhost UMESH]# ll
ls: cannot access ejb: Input/output error
total 0 d? ejb
[root@localhost UMESH]#

The privileges for root for UMESH are as below:
[root@localhost media]# ll
total 4
drwxr-xr-x 3 vickey root 4096 1970-01-01 05:30 UMESH
[root@localhost media]#

Also I can't even paste a file in the USB.

View 7 Replies View Related

General :: Manually Remove .vdi Files Left Over After Deleting VirtualBox?

Oct 24, 2010

I have a question, that may sound silly. I have removed VirtualBox from my Ubuntu install. But the .VirtualBox folder is still existing with a virtual drive of nearly 10 GB. Can I manually remove the folder .VirtualBox with rm -rf without any unwanted side effects?

View 2 Replies View Related

General :: Del Command To Remove Files To Directory Instead Of Completely Deleting Them?

Dec 2, 2010

how to write a script so that when I use the 'del' command it removes/sends the files / folders to a I specify for example 'dustbin'

View 1 Replies View Related

General :: GUI Application For Finding / Deleting Duplicate Data Files

Jan 10, 2011

I copied a back up of my windows 'my documents' fold and all of its' sub folders into my linux (Mint Debian) Documents directory. I found that many of my files can be found in more that one directory so, what I want to do is to find all the dups and deal with them. Is there a good linux application to resolve this 'duplicates' problem. (I don't want to touch the linux system files.)

View 2 Replies View Related

General :: Deleting Files In Ubuntu Doesn't Free Up Space On Partition

Dec 22, 2009

After running photorec I went from having ~30 gb of free space to having 0 bytes of free space. I have deleted all the results of photorec and various other large files and removed them from trash but it still has not freed up any space. Also, my firefox no longer has back/forward functionality which I'm sure would be fixed by a reinstall but seeing as I have 0 space, I can't really do that. Any thoughts?

View 7 Replies View Related

General :: Rsync Would Keep Sending The Files Over And Over Again?

Mar 2, 2010

I'm trying to using rsync to backup some files, about half a TB. It's now it a state where it keeps sending the same files everytime it runs. for example:

rsync -av /data/source/* user@host:/data/dest
sending incremental file list
source/file1.txt
source/file2.txt

I then verify those files are copied over. then the next time it runs it does the same thing

rsync -av /data/source/* user@host:/data/dest
sending incremental file list
source/file1.txt
source/file2.txt

any idea why it's getting stuck on these files? I've tried to wipe the whole dest directory out and start over but no luck.

View 2 Replies View Related

General :: Rsync Only Newest N Gb Of Files?

Jul 27, 2011

I have two directories, dirA whicht contains N gb of data and dirB which is supposed to contain only the newest M gb of data from dirA. When files are added to dirA, they sould also be added to dirB, while the oldest files in dirB should be deleted.Is that possible with rsync? or any other software?

View 1 Replies View Related

General :: Rsync With Scp - Copies Everything - All Files

Jul 12, 2011

rsync -r -v -e ssh root@nn.nn.nn.nn:/usr/local/websites/* /usr/local/websites and each time I run it it copies everything - all files. I thought rsync was only supposed to copy files that had been added or modified.

View 3 Replies View Related

General :: Rsync N Newest Files In A Directory?

Nov 8, 2010

What would be the easiest way to go about rsyncing the n newest files in a directory to a remote server?

View 2 Replies View Related

General :: Rsync, Crontab And Backing Up Files?

Apr 11, 2011

This is a quick one, I don't have any problems yet, I just want to check that this is going to do what I think it is. I added the line

Code:
00 01 * * * rsync -avz --delete /local-storage /mnt/usbackup
to my crontab file, am I to understand that this will backup /local-storage to my external

[code]...

View 4 Replies View Related

General :: Rsync Files With Dates After A Certain Date?

Jun 8, 2010

I was going to do a rsync -r -a -z -v -p -e sshto move some files frome server to another, but then realized all I really need are files which have dates starting June 1, 2008 to current. Is there a way to have rsync only sync those files?he directory structure that's my source goes all the way back to 2004.

View 5 Replies View Related

General :: Order Of Transfer All Files Under A Directory By Rsync

Sep 25, 2010

If transfer all files under a directory by rsync, what is the order that rsync determines to transfer the files one by one?At first it looked like rsync transfers files in alphabetical order, but later I found rsync skipped some files in the first sweep through the alphabetic order, and then went back to transfer files that were skipped in the first time and this time still in alphabetic order.

View 1 Replies View Related

General :: Rsync And Making Sure All Files Have Been Transferred Before Applying The Changes?

Nov 15, 2010

I was wondering if there is a way to tell rsync to only apply changes (delete, overwrite,create) only if all files in the file list transferred successfully.Just to clarify, this would essentially be putting a transaction around the transfer.

View 3 Replies View Related

General :: Rsync Speed For Single Files And Directory?

Mar 23, 2010

Recently i am trying to check on the rsync speed for single file(2.4GB iso) directory ( 900MB directory with files inside ) When i run the rsync for single file: the speed i get is average 50MBps However, for a directory: average speed is 10MBps Is there any reason behind this ? i tried to google but unable to get the concept.

View 2 Replies View Related

General :: Rsync With Skipping 0 Bytes Files Option?

Jun 10, 2011

For backup purposes, I have been trying to find out a solution for Rsync -avr sourcefolder targetfolder with Skipping 0 bytes files option.

However it seems that they are no solutions. Would someone have an idea, to skip to source files into the sourcefolder that have no content, ie. 0 bytes?

View 2 Replies View Related

General :: Files Seem To Take Up More Space In Destination After Rsync Copy?

Feb 9, 2010

I have recently purchased an external hard drive in order to backup my home partition. In my PC I have a "1.5T" drive with several partitions on it, containing OSes and the home partition. The home partition is 1.3T according to df, the external drive contains one partition that spans the entire disk,df reports it as 1.4T in size. Both partitions are ext3. When I use rsync to copy files from the home partition to the external partition, the external disk becomes full, despite the destination - supposedly - being larger than the source. I don't understand why copying files from one partition to a slightly bigger partition should need more space than on the source partition. Does anyone know what is happening ?

Details : I created the partition on the external drive with gparted; gparted reported it the already have several gigabytes in used space immediately after the partitions creation - I thought at the time that this must be normal. The home partition contains many files of all sorts, including lots of big audio and video files. If you are wondering, for all my important files this external disk is only secondary backup, as they are also backed up to the "internet".

These are the mount points :

/mnt/tmp/ : home partition, /dev/sdb6
/mnt/external/ : external partition, /dev/sdc1

I used rsync to copy the files, I know there are more efficient ways to do this, but I wanted to use the same command that I will subsequently run to sync the backup.

rsync -av --progress --stats --recursive --perms --links --delete /mnt/tmp/ /mnt/external/

Next I tried adding the --sparse switch, as I was wondering if the problem may come form sparse files. I don't know however if rsync would go back and shrink the sparse file by just adding the switch and executing the command. I also added --one-file-system, for good measure. Here is what I ran next :

rsync -av --progress --stats --sparse --one-file-system --recursive --perms --links --delete /mnt/tmp/ /mnt/external/

I tried an fsck on the home partition :

fsck -f /dev/sdb6

This is the output from the last rsync :

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: write failed on "abcd.avi": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.6]

[code]....

Looking at the destination after a partial copy seems to indicate that the problem is not symbolic links being "expanded". I have not checked the source filesystem for sparse files, nor the destination to see if these files could be larger there, as this does not seem trivial.

Here is some additional info :

$ df /mnt/tmp/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb6 1415342836 1414173740 369096 100% /mnt/tmp

[code]....

View 2 Replies View Related

General :: Why Doesn't Rsync Use Delta-transfer For Local Files?

Jan 17, 2011

I have a big iso image which is currently being downloaded by a torrent client with space-reservation turned on: that means, file size is not changing while some chunks in in (4 Mib) are constantly changing because of a download.

At 90% download I do the initial rsync to save time later:

$ rsync -Ph DVD.iso /media/another-hdd/
sending incremental file list
DVD.iso

[Code]....

Then, when the file's fully downloaded, I rsync again:

total size is 2.60G speedup is 1.00

Speedup=1 says delta-transfer was not used, although 90% of the file has not changed, target dir is on another FS and copying takes several minutes. Why doen't it try to speedup the transfer?! How can I force rsync to use delta-transfer?

View 1 Replies View Related

General :: Rsync Error Message For Command - Files Could Not Be Transferred

Aug 10, 2010

I have rsync error message for this command,

Quote:
rsync -avr --delete --exclude lampp/tmp/* /opt/* /backup/opt/
rsync -avr --delete --exclude data/session/* /var/www/html/dmcatholic/* /backup/dmcatholic/

The error message is here.

[code]....

sent 1917154 bytes received 384128 bytes 5731.71 bytes/sec total size is 12220966785 speedup is 5310.50 rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved