Operating System - Linux
1830135 Members
2943 Online
109999 Solutions
New Discussion

Taking Back up of files in the network

 
SOLVED
Go to solution
shetty
Frequent Advisor

Taking Back up of files in the network

Hi guys,
I need to Take Back up of files in the network. Iam trying to write some scripts for that, but i find it difficult to do that.
Can any one tell me how to achieve this.[If you guys have that script please send me].

Shetty.

7 REPLIES 7
Stuart Browne
Honored Contributor

Re: Taking Back up of files in the network

It really depends where the files reside on the network, and what sort of backup you want to end up with.

If you're talking about a single file on a given Windows box, you can use 'smbclient' to copy the file to the Linux server, then do your backup as you see fit.

If you want to do an entire share, you can mount it locally, then do your backup.

If you want to back up other Linux/Unix boxes, then it's time for either NFS or host-equivalency so you can do backups those ways.

If you just want to make copies of files to your Linux server, then that's great, and easy. If you want to do a real backup to a tape, then that's also pretty easy, but differs depending on what your wanting to backup. If you want to create CD's or DVD's with rescue information, there's more options available again!

Some more details so we can give definate examples for your environment would help us immensly. :)

It's a fun world.. really! :)
One long-haired git at your service...
shetty
Frequent Advisor

Re: Taking Back up of files in the network

Hi Stuart,
I don't have any NFS server in my environment. I want to take backup of files(linux)on to my system(linux).

I can use ftp to transfer files,but i want to use script , so that i can put it in cron file.Everytime using Ftp is tedious, so iam trying to write one script which should automatically take backup.

Shetty.
Chris Saunderson
Frequent Advisor

Re: Taking Back up of files in the network

ncftp is what you're looking for. Does most of what I think you're looking to do through it's scripting.
Ted Nugent called. He wants his shirt back.
Jan Sladky
Trusted Contributor
Solution

Re: Taking Back up of files in the network

hi Shetty,

for few files backup you can use combination of cron and ftp

23 59 * * * /usr/bin/ftp /usr/bin/ftp -i -n -v < mybackup.sh

cat mybackup.sh

open 10.32.113.177 #backup destination
user ford abcd #abcd is password
hash
prompt off
cd /dir
mput file_you_want_to_backup
bye

at midnight you have your backup in /dir

br Jan
GSM, Intelligent Networks, UNIX
Pascal Eberhard
New Member

Re: Taking Back up of files in the network

For a Linux to Linux backup, you can use OpenSSh to do this job. It is easy to set up and offer a acceptable level of security.

If you want to make a network backup of your /etc directory for example. Go on your server to backup. And do, in root, something like:
# f=etc-`date +"%Y%m%d-%H%M"`.tar.gz
# tar zcf - | ssh user@backuphost cat \> /backupdir/$f

It is possible to automate this by using pair keys autentication rather than password. Ssh keys (generated via ssh-keygen) allow you to do a relatively secure autentication without password.

There are a lot of other possibilities of course. This one is simple to set up and secure enough to be suitable for most of the network environments.
Bill Thorsteinson
Honored Contributor

Re: Taking Back up of files in the network

There are a number of tools for Network
backups available for Linux.
Amanda is one of the most frequently referernced
ones. It handles networks large and small.

I also use ibackup which does a configuration
backup of /etc and few other features.
shetty
Frequent Advisor

Re: Taking Back up of files in the network

Hi guys,
Thank you very much for you suggestions.
Now iam able to take backup using your ideas.

Shetty.