Moving a database from one server to another


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Moving a database from one server to another
# 1  
Old 07-13-2010
Moving a database from one server to another

I hope I'm posting this in the correct section.

I'm trying to move a database from one server to another. This is the code I'm using...
Code:
tar czf - vbdatabase.sql | ssh username@full.domain.com 'cat > /home/cpanelusername/vbdatabase.tar.gz

... but all I'm getting is a ">" and then nothing happens.

Thoughts? Suggestions?

(today is my first day working with ssh so, um, yeah)

Chimpie
# 2  
Old 07-13-2010
Hi.

You're getting the > because you have an opening single quote ', which is never closed.

In any case, I don't think you can pipe tar to ssh in this manner.

Best is to tar and compress the stuff, then scp it.

Code:
tar cf - dir_of_my_files | gzip -c > dir_of_my_files.tar.gz
scp dir_of_my_files.tar.gz user@host:/some_dir

As to whether your database actually works on the other server depends on more factors (software being one of them)

HTH
This User Gave Thanks to Scott For This Post:
# 3  
Old 07-13-2010
thanks for noticing the '

It's sending the information now. I'll let you know and the rest of the readers know what happens.

Since I'm learning, what is scp?
# 4  
Old 07-13-2010
It's secure copy and uses the same protocols as ssh (secure shell). If one works, the other will.

I deleted my earlier post at first, because I wasn't sure that using ssh in that way would work, but undeleted it at least for the ' hint!

I use ssh a hundred times a day, but never to copy files, so if it works, let me know Smilie
# 5  
Old 07-13-2010
It works, but ran into a problem that's not your fault. Too long for an un-needed explanation.

Thanks again. You'll see me a few more times as I attempt to teach myself ssh/shell.

Chimpie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Is it mandatory or not to stop/start Applcation server ehen Restarting Database Server?

Good afternoon I need your help please. There is a Mantenance Windos which needs to Restart de Database Server 192.x.x.97 to set up some configuration Is it mandatory or not to stop/start Applcation server that runs in 192.x.x.95 ? Is it mandatory or not to stop/start apache and Tomcat?... (3 Replies)
Discussion started by: alexcol
3 Replies

2. Red Hat

Moving boot SSD from a dead server to a new server

Hi all, We have a disk array that has the boot drive on an OCZ SSD on a PCIe card. Well, the motherboard died and we got a new motherboard. We moved the controllers, NICs, etc, to the exact same slots on the new motherboard, except now it won't boot. I guess it doesn't recognize the OS on the... (1 Reply)
Discussion started by: glowe57
1 Replies

3. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

4. UNIX and Linux Applications

Moving Oracle database

how does one move Oracle database to new OS? Does Oracle need to be the same version as old one? (6 Replies)
Discussion started by: orange47
6 Replies

5. Solaris

Key Points when Moving from Server A to Server B??

Hi Everyone, I'm still learning daily about UNIX (specifically Solaris 10). I'm tasked with moving my current application and database from Datacenter A to Datacenter B. There will be no updates and no changes other than a new server and new location. So far, I have Solaris... (3 Replies)
Discussion started by: smckech1972
3 Replies

6. Shell Programming and Scripting

Moving files from one server to another server every 5 min

HI All, I am trying to automate my stuff to make 'to-do-easier'. I am new to shell scripting. I need help to you regarding the below problem. I have one directory in my server, frequently files will store in that directory. I want to move that files into another server on every 5... (5 Replies)
Discussion started by: ravvamohan
5 Replies

7. AIX

moving to new server

I'm moving an application from an old RS6000 running 4.3.2 to a p5 running 5.3. Could someone point me a the direction on docs to perform such a function? Critical OS files, moving of printers and print queues especially. thanks (5 Replies)
Discussion started by: sullivjp
5 Replies

8. UNIX for Dummies Questions & Answers

moving apache from 1 server to another

i need to move apache 2.2 from one server over to another server..... my servers are in atlanta and i'm logged in here in florida... what commands do i use ???? somebody mentioned the fetch command... please help.... i'm an idiot when it comes to unix (2 Replies)
Discussion started by: marinob007
2 Replies

9. AIX

Moving to new AIX server

Hello everybody, I am going to move to new AIX server and the question is how to correctly and painless move the whole configuration? I mean for example users, network, and - what is very important - the whole printer system configuration? I think users are simple to move - only /etc/passwd and... (1 Reply)
Discussion started by: Yac
1 Replies

10. Shell Programming and Scripting

Moving data from one database to other

Dear All, I have 2 databases, There is a lot of data in both the databases, i would like to move some data from one database to the other. I would like to accept 2 parameters from the user, i.e. emplyee id & dept, on entering the 2 i will unload all the data from the tables to the flat files.... (6 Replies)
Discussion started by: lloydnwo
6 Replies
Login or Register to Ask a Question