I am new to Ubuntu after a long time of putting it off. Over the past few months I have gone from a complete novice to running my own home server with nginx and php-fpm and my website is working great. Covered all aspects from mysql to SSL with a little help from users here.
I even lost my whole /etc/ directory which I managed to come back from.
This is all from my desktop computer.
Ok enough chit chat I bought a server rack and now wanting to transfer my server to it.
I have Ubuntu server 14.04 on my desktop with my working website and Ubuntu server 14.04 on the new server rack.
I like the idea of taring my server and then extracting it however I am running into problems everytime.
I was following this guide HERE
Now I decided I would miss step 1 and jump to step 2 as I was going to use SCP or rsyncto transfer the final tar.
When I entered
tar -cvzf ~/clone.tgz --exclude ~/clone.tgz /etc /home /opt /tmp /usr /var
and transferred the tar to my rack and extract it didn't boot so I relooked at the command.
I tried
tar -cvzf ~/clone.tgz --exclude ~/clone.tgz --exclude=/mnt --exclude=/etc/fstab /etc /home /opt /tmp /usr /var
And the rack booted but not to system it complained about network and waiting 60 seconds more then black screen.
I figured that I need to be excluding network files also. I then tried..
tar -cvzf ~/clone.tgz --exclude ~/clone.tgz --exclude=/mnt --exclude=/etc/fstab exclude=/etc/modules exclude=/etc/lilo.conf exclude=/etc/mtab exclude=/proc exclude=/dev exclude=/var/log exclude=/etc/network/interfaces exclude=/etc/hostname /etc /home /opt /tmp /usr /var
That still didn't work. So I figured that maybe there is more network files I need to be excluding or I am doing things in the wrong order.
I tried putting the tarred directories before the excluded files/folders that still didn't work and I also tried putting ./ before the allowed directories and also putting quotes around the excluded paths eg..
--exclude='/etc/fstab'
I was getting errors after tar so I removed the verbose option and seen that they were files that wasn't entirely important so now I figure that I must be needing to add more locations to exclude.
I must note that after removing the verbose option it did say..
Removing leading / from member names
And
Removing leading / from hard link targets
But after a bit of research that is supposed to happen
Any help would be great as it will save me going bald due to pulling my hair out :D
Best regards