1. Because not enough space to extract in current server.
2. To transfer big files with minimal time.
Here is the command;
Run this at "server source"
tar czf - /path/to/copy/folder | ssh shariha@serverdestination tar xzf - -C /path/to/place
eg:
server source: 10.10.10.10 : want to copy folder /data/folder1
server destination: 10.10.10.11 : want to place it at /data/migrate/
run at 10.10.10.10
tar czf - /data/folder1 | ssh shariha@10.10.10.11 tar xzf - -C /data/migrate/
ps: this will tar the folder and untar directly to the path that we want to place it. :)
Nice :)
No comments:
Post a Comment