LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2011, 02:54 PM   #1
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Rep: Reputation: 1
procedure for moving fs content


Hi

What to remember when moving content of a file system to another file system ?

Is there some kind of procedure for this operation ?

thx for help.
 
Old 07-04-2011, 03:08 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You should be sure to preserve the file permissions when copying. With cp it is the option -p, for rsync I would use -a. You can also use the tar-command.
 
Old 07-04-2011, 03:10 PM   #3
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
OK. But what tool you advice to use ?
- cp -p
- rsync -a
- tar
 
Old 07-04-2011, 03:11 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I generally use rsync -a for copying of large amount of files (or copying over network), but only because I am used to it.
 
Old 07-04-2011, 03:14 PM   #5
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
rsync requires rsync daemon to be running on the destination machine ?
 
Old 07-04-2011, 03:21 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
No, if you copy over the network you need a SSH-daemon running, AFAIK. Will also work with rsync-daemon (keep the different syntax in mind), don't know about SFTP.
 
Old 07-04-2011, 03:23 PM   #7
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
SYstem must be in run level 1 during this operation ?
 
Old 07-04-2011, 03:30 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
What actually do you want to copy? If you want to copy a whole system I would recommend to do this from a live-CD/USB, if you just want to copy one data partition to a different partition then no.
 
Old 07-04-2011, 03:37 PM   #9
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
Lets say we have 2 cases :
1. copy data fs from e.g. /home to /new_home
2. copy entire /( root) fs without /boot fs to /new_boot

1. How would be like procedure to move fs ?
2. How would be like procedure to move fs ?
 
Old 07-04-2011, 03:41 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
1. Use rsync while the system is running in the normal runlevel. Logout all users first and do that from the root account so that the data in /home will not be altered during the copy. Just for safety.
2. this makes no sense, why would you copy the /-partition to the /boot-partition? If you mean /new_root instead of /new_boot the do it from a live-medium, the system should not be running.
 
Old 07-04-2011, 03:47 PM   #11
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
2. Yes I meant from / to /new_root.
Why to do it from live-medium and why system should not be running ?
 
Old 07-04-2011, 03:59 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If rhe system is running you will have many files that may change, like log-files or a running database. Therefore it is recommended to copy from a not running system to avoid inconsistencies. It is not a necessity, but recommended. You cam also do it from a running system when you exclude such files and the files generated from a running kernel like the /proc and /sys trees.
 
Old 07-04-2011, 04:08 PM   #13
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
ok I understand.
So what for is runlevel 1 (single-user) ?
 
Old 07-04-2011, 04:16 PM   #14
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
The single user mode is for system maintenance, when it is necessary that no daemons are running (not even network).
 
Old 07-04-2011, 04:19 PM   #15
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Original Poster
Rep: Reputation: 1
What means system maintenance ?
Is it checking ?
- I/O errors
- adding new devices
- troubleshooting devices already installed

Last edited by drManhattan; 07-04-2011 at 04:30 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to move content of folder moving to public_html ? cluepatel Linux - Newbie 4 03-25-2011 11:59 AM
[SOLVED] [APPENDED]Real moving of a folder's content to another folder. MODYSAMA Linux - Newbie 10 02-07-2011 11:30 PM
What is the procedure for adding hard drives and moving things around? kuplo Linux - General 2 08-09-2006 03:31 AM
reading contents of a folder and moving that content vb.net mrobertson Programming 0 02-17-2006 08:14 AM
Apache serving content after the content is removed? jrbush82 Linux - Software 6 05-05-2004 04:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:39 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