perintah linux copy file antar server


Status
Not open for further replies.

shara nurul

Apprentice 1.0
Sebelumnya mohon maaf

saya mau numpang tanya pada para master ,bagaimana ya caranya copy file antar server yang berbeda port nya

soalnya saya coba tidak berhasil

scp namafile.tar.gz root@IPSERVERBARU:/home

Mohon pencerahannya
 

susan

Apprentice 2.0
Sebelumnya mohon maaf

saya mau numpang tanya pada para master ,bagaimana ya caranya copy file antar server yang berbeda port nya

soalnya saya coba tidak berhasil

scp namafile.tar.gz root@IPSERVERBARU:/home

Mohon pencerahannya

scp -Pxxx namafile.tar.gz root@IPSERVERBARU:/home

xxx = port number
 

BennyKusman

Hosting Guru
Verified Provider
klo copy data hosting dari server1 ke server 2 bagaimana ya? ada yang tahu tidak?

sudah coba pakai rsync ?

ini diambil dari webbycart script
Remote Rsync via SSH Setup Instructions


Step 1
Log in to your server through SSH, telnet, or another shell access method. You can use the freely available putty to connect to ssh, you can download putty here. (Note: To work properly, rsync must have read access to the files it is to back up. For this reason, it is often executed as the root user. However, it may also work when executed from individual user accounts)
Step 2
Create an RSA encryption key for use with the SSH transport. You may check if a key already exists by executing the following command:

# cat ~/.ssh/id_rsa.pub

If the file already exists, you may skip to step 3. Otherwise, create a key with the ssh-keygen utility:

# ssh-keygen -t rsa -N '' (note: these are two single quotes)


Step 3
Copy your RSA encryption key to the WebbyCart Remote Bbackup Server. You may do this through the shell as well.

# scp ~/.ssh/id_rsa.pub [email protected]:keys/server1

# ssh [email protected] keymerge


Step 4
You may now test rsync by copying a small directory, such as /etc:

# rsync -avz -e ssh /etc [email protected]:server1_daily

If you receive any error messages, please contact technical support at [email protected]. Otherwise, congratulations on configuring rsync to work with our system. You may now add rsync as a daily cron job, as outlined in step 5.
Step 5
If you are using Plesk Server Administrator, you can access crontab entries through the System menu under Services. Add a new task as root. Choose a Minute (0-59) and Hour (0-23) for the script to run each day. For Day of the Month, Month, and Day of the Week, just type a wildcard (*). Command will be in the format listed below.

If you are using Cpanel/WHM, you'll need to add a crontab entry manually through the shell. As root, execute the following command (variations listed below):

# echo "0 5 * * * root rsync -avz -e ssh /home /var /etc [email protected]:server1_daily" >> /etc/crontab
(note: don't forget both brackets...that's >>)

Various rsync configurations:
Back up entire server: rsync -avz -e ssh / [email protected]:server1_daily
Back up home directories: rsync -avz -e ssh /home [email protected]:server1_daily
Back up specific users: rsync -avz -e ssh ~bobby ~josh ~tisha [email protected]:server1_daily
 

idcolo

Apprentice 1.0
Sebelumnya mohon maaf

saya mau numpang tanya pada para master ,bagaimana ya caranya copy file antar server yang berbeda port nya

soalnya saya coba tidak berhasil

scp namafile.tar.gz root@IPSERVERBARU:/home

Mohon pencerahannya

pesan errornya apa ya?

betul kata om2 yang lain, gunakan perintah scp atau rsync

coba tambahkan opsi port, scp namafile.tar.gz -P portnya root@IPSERVERBARU:/home

tapi ada baiknya menjalankan kedua perintah tersebut menggunakan background, screen

semoga membantu
 

arieonline

Expert 1.0
hmm... itu port emang wajib yah?

soalnya saya seringnya cuma

Code:
ssh file hostname.com:/folder/

nb: port ssh default 22 tidak diubah
 

perdhanahost

Hosting Guru
hmm... itu port emang wajib yah?

soalnya saya seringnya cuma

Code:
ssh file hostname.com:/folder/

nb: port ssh default 22 tidak diubah

Kalo portnya masih default (port 22) tidak perlu pakai opsi -P mas .. Opsi -P hanya dibutuhkan kalau server menggunakan port SSH customized :)
 
Status
Not open for further replies.

Top