Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
From a command line? Refer to the manual page for the CP command in a console, type 'man cp'. The option you likely want specifically is '-p for preserve attributes'.
Use one of these to create a compressed tar ball file:
tar cvzf /tmp/mytarfile.tar.z /pathToDir/OrFilesIwant can be a /listOfFilesOrDirs
To check to see if the fiel created ok:
tar tvzf /tmp/mytarfile.tar.z
or to get every file in the current directory and every sub dir without the absolute path use:
tar cvzf /tmp/file.tar.z .
ftp the tar file to the new server and use this to extract them:
tar xvzf /tmp/mytarfile.tar.z
If you used the absolute path to reference the files in the tar backup make sure you are in / when you extractthe files.
tar flags:
c to create
x to extract
t to tell me what is in the file
v verbose (show me what you are doing)
z compress with gzip
f I will tel you next which file to write to.
rsync is the best option from my point of view.
1. Install/Configure rsync server on new server.
2. Run following command from old server to sync data.
rsync -rauv $DATADIR"/" NewServer::data/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.