LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-04-2004, 12:33 PM   #1
enygma
Member
 
Registered: Mar 2003
Distribution: CentOS 5.2
Posts: 43

Rep: Reputation: 15
Need a backup script


Hey, I just finished a server and want it to start backing up computers on the network. The server is of course a Linux server with about 1.1TB of useable storage for backing up. But I want to try and automate the backup process as much as possible. For the most part, there are systems on the network that share their entire drives and partitions with password access, so there are a lot of files to move. However, I only want the files that are copied to take forever once. This means that after all the files are moved over, any time I do another backup, it needs to check the date the file was last modified automatically and determine if the file going over is newer or not. So basically, any time in the future, when I run this backup script, I want it to copy over files that don't exist on the server yet because they are new, and overwrite old files with the newer ones on the workstations.

Is there any available scripts out there that just need slight modifications to work? Currently, I am just moving files over as such:

mount -t smbfs -o username=userforpc //pcname/c$ /mnt/pcname/C_Drive
password:

mkdir /storage/failsafe/pcname_system_backup/C
cp -frv /mnt/pcname/C_Drive/* /storage/failsafe/pcname_system_backup/C/

So pretty much, I want to be able to customize source and destination for certain folders, and then have it copy only the files necessary, being new or modified files.
 
Old 11-04-2004, 12:40 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
rsync would be your best bet:
http://www.linuxquestions.org/questi...ticle&artid=80
 
Old 11-04-2004, 12:46 PM   #3
enygma
Member
 
Registered: Mar 2003
Distribution: CentOS 5.2
Posts: 43

Original Poster
Rep: Reputation: 15
Just took a peek. Does it absolutely need to have an SSH pipe? The server is one of the very few systems in the office running under Linux, and the rest of the workstations are a mixture of Windows NT4 and Windows XP systems.
 
Old 11-04-2004, 01:36 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
No, you can mount the remote share and run rsync locally. This does reduce your security slightly and remember that it is possible to run an ssh server on windows.
 
Old 11-04-2004, 03:42 PM   #5
enygma
Member
 
Registered: Mar 2003
Distribution: CentOS 5.2
Posts: 43

Original Poster
Rep: Reputation: 15
ok, so basically using rsync to replace cp in this case would work? Prety much like:

rsync -avz /mnt/pcname/C_Drive/ /storage/failsafe/pcname_system_backup/C/
 
Old 11-04-2004, 03:49 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
Since it is copying from windows you can't back the permssions so just use:
rsync -rtl /path/to/src /path/to/dst
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup script raptorman Programming 4 08-22-2005 09:52 AM
What backup script do you use? buldir Linux - Software 1 04-12-2005 02:57 PM
Script Backup Buto Linux - General 2 10-18-2004 05:56 PM
help with backup script dennis_89 Linux - Networking 2 06-29-2004 09:47 AM
Backup Script imsajjadali Linux - General 7 01-28-2004 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration