LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-27-2019, 06:58 AM   #1
jarimlim
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Rep: Reputation: Disabled
Unhappy Copy CP ?


Hello,

I am a beginner ... I would be glad if I get help.

On a CentOS V7.5 there are about 250 GB of data. The data should be transferred to a W2012 server in a shared directory. I have these directories mounted. I started the copying with "cp -ax / home / linux_directory / mnt / Windows_direktory". 170 GB were transferred, then the line broke off. Here are 2 questions:

- Do I have to delete the copied 170 GB and start copying again ??
or
- Is there a way to start copying from the break point? if yes how ??

Vielen Dank

Last edited by michaelk; 01-27-2019 at 07:13 AM.
 
Old 01-27-2019, 07:40 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,770

Rep: Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768
Research rsync. Rsync or something that uses the rsync protocols may be your best answer.
 
1 members found this post helpful.
Old 01-27-2019, 02:32 PM   #3
jarimlim
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
command line

thanks...but what would the command line look like?

many thanks
 
Old 01-27-2019, 08:10 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,389
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
Code:
rsync -a [/path/to/source] [/path/to/target]
See man rsync for more about the "-a" argument before you proceed. Don't just take my word for it.

Last edited by frankbell; 01-27-2019 at 08:12 PM.
 
Old 01-30-2019, 08:36 AM   #5
jarimlim
LQ Newbie
 
Registered: Jan 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
solved

many thanks solved
 
Old 01-30-2019, 09:06 AM   #6
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 900

Rep: Reputation: 290Reputation: 290Reputation: 290
^ Good. Can you mark your thread as such please (see HOWTO in my sig)?
 
Old 01-30-2019, 12:26 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by jarimlim View Post
thanks...but what would the command line look like?

many thanks
rsync -aviS /path/to/files/to/send /path/of/destination

Code:
-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
-v, --verbose               increase verbosity
-S, --sparse                handle sparse files efficiently
-i, --itemize-changes       output a change-summary for all updates
     --out-format=FORMAT     output updates using the specified FORMAT
     --log-file=FILE         log what we're doing to the specified FILE
     --log-file-format=FMT   log updates using the specified FMT
     --password-file=FILE    read daemon-access password from FILE
     --list-only             list the files instead of copying them
     --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
     --write-batch=FILE      write a batched update to FILE
     --only-write-batch=FILE like --write-batch but w/o updating dest
     --read-batch=FILE       read a batched update from FILE
     --protocol=NUM          force an older protocol version to be used
     --iconv=CONVERT_SPEC    request charset conversion of filenames
     --checksum-seed=NUM     set block/file checksum seed (advanced)
example:
Code:
 rsync -aviS /home/user/foo.txt user@server:/home/user/
This will send the file foo.txt to the SERVER (destination) server in the path /home/user/

Note the trailing / that will place all of your files from source without the top level directory of the source. Leave the / off of both source/destination to create directories and sub-directories during the rsync process.
 
Old 01-31-2019, 07:06 AM   #8
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,770

Rep: Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768
Note that the server need not be specified if the two paths are mounted on the same host. (ie, a local clone/copy or transfer, or one involving a cifs, nfs, or sshfs mount)

I have found remote transfer reliable,even over slow network links. I have found local transfer very reliable. I have had issues at times with local transfer to a remote mounted volume: nfs, cifs, or sshfs is not always a happy camper. In addition, the extra levels of encryption and encapsulation impact performance.
 
Old 01-31-2019, 07:42 AM   #9
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by lleb View Post
rsync -aviS /path/to/files/to/send /path/of/destination
I like the -H option too, to prevent hard linkes files from being copied twice (or more):
Code:
-H, --hard-links            preserve hard links
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive.
You must separately specify -H.

Note too that rsync can only detect hard links between files that are inside the transfer set.
If rsync updates a file that has extra hard-link connections to files outside the transfer,
that linkage will be broken.

(both notes from the manpage for rsync).
 
  


Reply



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



LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:22 PM.

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