LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2015, 10:57 AM   #1
AaravMage
LQ Newbie
 
Registered: Jun 2015
Posts: 3

Rep: Reputation: Disabled
rsync to copy file locally


Hi

I am using rsync to copy the file in tmpfs to a disk file and I am copying on the signal handler. But there is data loss and the file is not fully copied... almost 10 to 20 packets are getting lost while copying...

Why is this hapenning and how do I avoid it ?




strcpy(a,"rsync --partial /mnt/ram/abc.csv .");
system(a);
 
Old 10-20-2015, 06:08 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by AaravMage View Post
Hi

I am using rsync to copy the file in tmpfs to a disk file and I am copying on the signal handler. But there is data loss and the file is not fully copied... almost 10 to 20 packets are getting lost while copying...

Why is this hapenning and how do I avoid it ?




strcpy(a,"rsync --partial /mnt/ram/abc.csv .");
system(a);
I am curious: What do you mean by packets?
In any case, I would check the exit code of the command and add options like --verbose which might give you a clue what's happening.
 
1 members found this post helpful.
Old 10-21-2015, 12:11 PM   #3
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
A better question is why would you want to do this?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] HowTo? Make rsync copy file names but not contents haertig Linux - Software 2 07-12-2014 04:05 PM
[SOLVED] File size increase after copy(scp,rsync) hesisaboury Linux - Networking 8 09-30-2013 08:04 AM
How to avoid the copy of the same file but with different name using rsync? jat421 Linux - Software 4 02-26-2013 12:45 PM
rsync: how to copy file, "Operation not permitted" nugroho2 Linux - Laptop and Netbook 3 04-21-2010 07:57 AM
Copy DVD's Locally? carlosinfl Linux - Software 9 05-28-2008 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration