server backup
Hi
i have centos 5.3 installed , i want data to backup from one location to another location, how can it poassible in centos AMAR |
just compress the folder you want to take backup of
Code:
#tar -zcvf (tar-archive-name.tar.gz) (source-folder-name) Code:
#scp (foldername) 192.168.0.100:/backup/ |
If you want to set it up as a cron job, to do it automagically, without authentication.
Set up passwordless authentication on the remote server the backup is destined for, and use something like: Code:
tar -cJf /folder | ssh -i keyfile user@server ">" file.tar.xz |
Quote:
http://www.lazysystemadmin.com/2010/...ile-it-is.html |
Thanks for reply
i tried this but it was copied in my local pc but not in remote pc, it shows copying but when i see in remote pc it will not shown cpied file, if i want to copy from centos server to remote windows pc then it is possible or not and the solution you given here i have to manually fired command as i want this backup done automatically at midnight daily on remote pc pls suggest |
Quote:
Backing up TO a windows machine is kind of like putting all of your eggs in one concrete mixer.... |
you can try exploring the rsync command if you want automation, but please make sure you understand everything before you do anything.
You might end up losing your data. here's the link for rysnc backup example: http://www.bobulous.org.uk/misc/rsync-backup.html you can use crontab to run the script at night: http://rootprompt.org/article.php3?article=8976 |
Quote:
just try samba server.it is the best one for sharing files and folder between linux and windows |
Hi deep27ak
#tar -zcvf (tar-archive-name.tar.gz) (source-folder-name) and use scp to copy from server location to remote location Code: #scp (foldername) 192.168.0.100:/backup/ ^ | | IP of remote machine with location of bacup folder this work for me, i copied data from one centos server to another centos server, but i want this should done automated at everymidnight, pls suggest |
I am not so good with crontab but you can try this one
Code:
#crontab -e Code:
#ssh-keygen -t rsa -----(on your server) Now copy the id_rsa.pub to your remote machine Code:
#scp ~/.ssh/id_rsa.pub 192.168.0.100:~/.ssh/authorized_keys (on your remote machine) Code:
#touch ~/.ssh/authorized_keys It will ask for the RSA passphrase instead of password Now you can save this password (on your server machine) Code:
#ssh-agent /bin/bash |
see something like you need I wrote a guide
|
All times are GMT -5. The time now is 06:10 PM. |