Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I do not have access to the physical hard drive of the server, but I do have SSH and FTP access. How would I go about moving all of the data from one CentOS server to another server box? It is a dedicated server and I am trying to upgrade to a better server box, but I have absolutely no clue where I would start to migrate it. My hosting company does not manage the servers and I have been told I will need to do it manually. A backup seems like the logical option but I have no idea how I would create the backup. Last time I tried to backup (into a tar file) lots of files corrupt as they were constantly changing. Would I need to stop ALL of the services running on the box, or is there some way I could go about this without "breaking" everything?

share|improve this question

closed as off topic by Aaron Copley, Dan, Jenny D, Tom O'Connor, kce Apr 29 '13 at 15:48

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This is far too complex a question for a simple Q&A forum. The best advice we can give you is "Make a backup, restore it to the new box, and test to make sure you didn't break anything." -- Making the backup is left as an exercise for the reader (what you grab and how you grab it depends on your environment), as is the restore/test process (which depends on what your server does). – voretaq7 Apr 29 '13 at 15:09
possible duplicate of Need to replicate server environment - Where to start? – Jenny D Apr 29 '13 at 15:13

You don't tell us what is running on the server, so my advice is generic.

If you don't know how to backup and migrate your server it sounds like you wouldn't know what to do in the event of a disaster or hardware failure. Start by figuring out what data is not replaceable by a rebuild. This all depends on what your server does and is running. For example, a web server. Backup your Apache configs (/etc/httpd/conf*) and DocumentRoot (/var/www/html/*.) Test your restore to the new host before shutting down the old one.

If files are constantly changing, yes, you should stop the services to make a "stateful" backup. Certain services have a provision though for making a 'hot copy.' If the service has no provision for a hot copy, you can use LVM snapshots. (Assuming your filesystem lives on LVM.)

share|improve this answer
Sorry, I probably should have mentioned the software. We have a few Bukkit servers running for Minecraft, a ZPanel daemon and the required software for it (e.g. Apache w/ PHP, MySQL, BIND). Other than those, I don't believe we have much else. Obviously we will stop the Minecraft servers gracefully before even attempting to transfer the server. – daviga404 Apr 26 '13 at 20:51

As a general recommendation: You should always install Linux twice on such systems. A small service Linux makes many serious tasks easier (and a lot faster). That way you could easily backup your main installation because it would be inactive during this.

  1. You should start with partitioning the new server (including mkfs on the volumes for the main system) and installing a service Linux.
  2. Then you should boot the old system from CD/DVD and mount the partitions you want to copy.
  3. You need a working SSH connection from the CD boot on the old system to the new one.
  4. On the new system you have to mount the target volumes.
  5. Then you can copy the data, e.g. using tar:

    cd /path/to/source_volume_1 tar -czf - --one-file-system . | ssh -e none root@newserver 'tar -xf - -C /path/to/target_volume_1'

share|improve this answer
He has no physical access to the host. – Aaron Copley Apr 26 '13 at 18:36
@AaronCopley So what? – Hauke Laging Apr 26 '13 at 18:37
Makes it hard to boot from a CD/DVD. – Aaron Copley Apr 26 '13 at 18:38
@AaronCopley I would consider that a strange dedicated server if it didn't offer you any other boot options than your disk. – Hauke Laging Apr 26 '13 at 18:43
@HaukeLaging Our server is from OVH, a Kimsufi model. As far as I know, they don't allow for CD/DVDs to be booted. – daviga404 Apr 26 '13 at 20:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.