FTPing backup files to another server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers FTPing backup files to another server
# 1  
Old 10-04-2002
FTPing backup files to another server

I am running a hot backup of my database every night within our cronjob. Recently I got burned because the tape which holds my backups became corrupt. I am setting up another Sun box to hold my backups as well as writing them to tape. I know dumb error on my part. My question is what will I have to do to automate the ftp action to move the backup file to the backup server every night with some sort of script or command? I would like to have this done by the machine. I am not a Unix guru and would like some help if anyone has any ideas on this. Thanks for the input!
FRL
# 2  
Old 10-04-2002
There's some samples out there that can help you if you do a search on 'automate ftp', etc.

This is relatively easy to set up so you shouldn't have any problems. If you have some problems after you tried out some scripts then let us know.

Gianni.
# 3  
Old 10-04-2002
I have found a script and tried it to no avail. I get the following error.

Warning: tcgetattr failed in ssh_rl_set_tty_modes: Inappropriate ioctl for device

I got the following script from this site and used it. I got it to ask for my password but that isn't what I'm aiming for. I need this thing to run at night on it's own. And it asked me for my root password not the password for the user I specified in the script. I know what all the lines are for except the first and the 5th (lcd....). Can someone explain what those are doing for me. I think I'm on the right track, just need some more directions.

sftp IP ADDRESS<<end
user uname pword
cd /security1
bin
put filename
bye
end
# 4  
Old 10-04-2002
If you use tar you can backup remotely:

tar -czvf machine_name:/home/user/backup.tar.gz /dir2/backup

Smilie
# 5  
Old 10-04-2002
Quote:
Originally posted by WIntellect
tar -czvf machine_name:/home/user/backup.tar.gz /dir2/backup
Is this the equivilent of the Win32 SMB \\servername\sharename method of accesing a sub-dir or file without mapping a drive?

I reckon tonight Iwill have to see if I can get from my OpenBSD to my FreeBSD machine this way. I use the \\servername all the time at work and would like to be able to do similiar under Unix.
# 6  
Old 10-04-2002
I got that tip from man tar - however, whenever I try to use it I get an error about being unable to access the archive - I presume I need to setup some form of allowance on my FreeBSD box?

Any ideas which file?
# 7  
Old 10-08-2002
tar across network

would tar -czvf machine_name:/home/user/backup.tar.gz /dir2/backup work across network for linux/unix boxes, to the tape drives?


tar -czvf machine_name:/dev/rmt/st0/backup.tar.gz /myhomedir/


would this work?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

How to backup a directory (sub-directories/files) files from one server on to other ?

Hello, Server A: /directory1/ Server B: /Backups/ i wanted to backup contents of /directory1 from "server A" on to "Server B" every 1 hour. If there is any change in (only new/differences) contents on serverA (directory1/) supposed to be backeup on next run. I did used rsync command to... (5 Replies)
Discussion started by: System Admin 77
5 Replies

2. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

3. Solaris

Server Backup

Hi, As per my understanding in sun ufsdump and snap are 2 methods of backup of file system. what is inode table backup? or can we take only inode table backup? Regards Manu (1 Reply)
Discussion started by: manoj.solaris
1 Replies

4. Shell Programming and Scripting

FTPing files from unix server to windows server

Hi, Below is the script which ftps the file from unix server and putting in a different directory(but on unix server) How can i ftp the files from unix server and to place in a secure location on windows server? what changes needs to be done to the below script? How can this be... (1 Reply)
Discussion started by: venkatesht
1 Replies

5. Shell Programming and Scripting

Facing problems when FTPING file from server to local (Very Urgent)

Hi, when i am trying to FTP one file (test.txt) from Unix server to my local machine then i am getting the following error, as shown below ftp> binary 200 Type set to I. ftp> put C:\FTP\test.txt C:FTPtest.txt: No such file or directory ftp> The red color text is the error. Can... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies

6. UNIX for Dummies Questions & Answers

Script for FTPing files to mainframe GDG

Hi, Request Unix gurus to kindly share a script which FTPs multiple files from Unix to a Mainframe GDG. The script should check for oldest file named as 'abc*.txt' in a directory '/dir/child'. FTP that file to MF, then remove the file from unix and then look for the next oldest file to be... (1 Reply)
Discussion started by: dsrookie
1 Replies

7. Shell Programming and Scripting

removing files after ftping

Hi All, I'm trying to write script to ftp some files and then need to remove these files from server. Is there any way to keep the condition that the file should be removed only after successfully transfered to the destinatino server? If in case, the file isn't been transferd, it should not be... (5 Replies)
Discussion started by: im_new
5 Replies

8. UNIX for Dummies Questions & Answers

FTPing from XP to Solaris

Hello. I'm new to Unix. I've got a SUN Ultra 10 running Solaris 5.7 and I'm trying to FTP to it from my XP PC. My PC has an IP address of 10.0.0.3 and a Subnet of 255.255.255.0. I'm connected to the Sun machine with a crossover cable. I type "ifconfig hme0 10.0.0.5" in a shell window (as... (3 Replies)
Discussion started by: dtferreira
3 Replies

9. UNIX for Advanced & Expert Users

FTPing over COM port ???

Hello. Can someone please help, or give me any advice. The company I work for has a unix machine and works over the com port rather than IP. We need to retrieve some files from it onto another unix machine and we are trying to get an ftp program to work, does anyone know any ftp programs that... (1 Reply)
Discussion started by: badge
1 Replies
Login or Register to Ask a Question