LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-09-2013, 02:08 PM   #1
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Rep: Reputation: 30
copy whole filesystem via scp ?


Hello!
Today i try to copy a whole filesystem from old server to directory of new with command like scp -r -s -v 192.168.1.1:/ /second/Old_server
but it stops after another time with last lines like copy TtyS ?
i try to copy another ( data_ disk ) with that manner and too have a stop. i think, it try copy directory like a /lost+found and stuck there. it be can copy whole system on scp? if i remember xorrectly, cp -ax have do it, it has some similar for scp? search over google, not see a solution...
 
Old 02-09-2013, 02:19 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 872

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
The problem is that scp won't handle special files like devices. But something like this will do the trick:

ssh root@192.168.1.1 "(cd / ; tar cf - . )" | (mkdir -p /second/Old_server ; cd /second/Old_server ; tar xvf -)
 
2 members found this post helpful.
Old 02-09-2013, 02:21 PM   #3
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Original Poster
Rep: Reputation: 30
thanks,ill try it tommorow
P.S. and thanks for the slackware - i use it from 4.0, mainly for routers \ servers, but also a 3-4 years also as only desktop system too some time i use mandriva / mandrake for desktop, but it's "microsoft way" with glucks, and strange things bored me

Last edited by WiseDraco; 02-09-2013 at 02:26 PM.
 
Old 02-09-2013, 05:37 PM   #4
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 872

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
A quick addendum -- you might have to set umask 000 on the receiving end to avoid filtering perms on /tmp and certain files that might be writable by a group. Here's a fixed command line:

ssh root@192.168.1.1 "(cd / ; tar cf - . )" | (mkdir -p /second/Old_server ; cd /second/Old_server ; umask 000 ; tar xvf -)
 
2 members found this post helpful.
Old 02-10-2013, 03:25 AM   #5
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Original Poster
Rep: Reputation: 30
Thank you very much! looks like working - in that moment files copying, and some hours continued this state * ~250 Gb )
with your permission, i want to put that command somewhere in slackware docs ( docs.slackware.com), for others, and even me can find this command when it need next time
 
Old 02-10-2013, 03:56 AM   #6
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 872

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
Quote:
Originally Posted by WiseDraco View Post
Thank you very much! looks like working - in that moment files copying, and some hours continued this state * ~250 Gb )
with your permission, i want to put that command somewhere in slackware docs ( docs.slackware.com), for others, and even me can find this command when it need next time
Absolutely. Be my guest.
 
Old 02-10-2013, 05:03 AM   #7
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,663

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Quote:
Originally Posted by WiseDraco View Post
Hello!
Today i try to copy a whole filesystem from old server to directory of new with command like scp -r -s -v 192.168.1.1:/ /second/Old_server
but it stops after another time with last lines like copy TtyS ?
i try to copy another ( data_ disk ) with that manner and too have a stop. i think, it try copy directory like a /lost+found and stuck there. it be can copy whole system on scp? if i remember xorrectly, cp -ax have do it, it has some similar for scp? search over google, not see a solution...
I'm not sure if this is exactly what you need, but you might want to have a look at this:

http://sourceforge.net/projects/g4l/

I'm using it in conjunction with a local FTP server. Works great.
 
Old 02-10-2013, 05:15 AM   #8
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by kikinovak View Post
I'm not sure if this is exactly what you need, but you might want to have a look at this:

http://sourceforge.net/projects/g4l/

I'm using it in conjunction with a local FTP server. Works great.
looks, it is not i want in this case. for backup i some years ago in few places used a backuppc solution - very good, imho.
 
  


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
How do I copy /dev/* from filesystem to filesystem Ulysses_ Linux - Desktop 12 03-09-2011 09:53 PM
Using SCP to copy to local knghtz Linux - Newbie 1 08-19-2009 01:53 PM
scp does not copy to a server??? malo_umoran Slackware 3 11-24-2006 04:13 AM
copy files....using scp help me suguname Mandriva 2 01-26-2005 01:14 AM
copy files....using scp help me suguname Mandriva 5 01-25-2005 05:42 AM


All times are GMT -5. The time now is 03:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration