LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2009, 08:21 AM   #1
tqz
Member
 
Registered: Jan 2008
Posts: 67

Rep: Reputation: 15
Backup files but not using tar


Hi all

Without using tar, I would like to backup my files from my ubuntu server to another external device, so that the files can be accessed without difficulty by a user using their windows pc i.e. dont have to use a restore program or untar files etc...

I have done this using the copy command which is executed by a cron job.
However if I would like to only copy files that have changed since the last copy (like incremental backups) how can this be done?

Also, is there a way of excluding files to copy - although I want to back everything up, I dont want to back up the files on the external storage or /proc, /tmp etc....

Many thanks in advance

t.
 
Old 08-14-2009, 08:22 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at rsync and/or the graphical interface grsync
http://rsync.samba.org/
It should be in your repo's.

Last edited by repo; 08-14-2009 at 08:28 AM.
 
Old 08-14-2009, 08:26 AM   #3
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
You can use rsync to do the copy. It will sync only changes on subsequent runs. And you can either explicitly include the dirs you want synced in a script or use the exclude [pattern] option.

Last edited by TBC Cosmo; 08-14-2009 at 08:27 AM.
 
Old 08-14-2009, 09:30 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
There's loads of stuff on the 'net about backing up. A Google search will find plenty of information!

tar's a bit long in the tooth now and not best-of-breed except for simple requirements. I use dar which is Disk ARchiver as opposed to Tape ARchiver. Robust and powerful.

I don't know rsynch but understand it synchronises source and backup files -- which means a file deleted on the source system would also be deleted on the backup system. Fine until you find out a month later that it's been deleted and you want it back. Am I right rsync experts?
 
Old 08-14-2009, 09:52 AM   #5
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
Quote:
Originally Posted by catkin View Post
I don't know rsynch but understand it synchronises source and backup files -- which means a file deleted on the source system would also be deleted on the backup system. Fine until you find out a month later that it's been deleted and you want it back. Am I right rsync experts?
It will not delete on the receiver, files deleted on the sender, unless you explicitly tell it to. --delete-excluded
 
Old 08-14-2009, 10:00 AM   #6
tqz
Member
 
Registered: Jan 2008
Posts: 67

Original Poster
Rep: Reputation: 15
Thank you all for your helpful responses! I'm going to try writing a script which uses rsync. I was actually thinking of that, but just thought there may be a possibly easier way using the copy command, so I would only have to make minor ajustments to my existing script!

Off to the rsync homepage I go...
 
Old 08-14-2009, 12:02 PM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
I don't know rsynch but understand it synchronises source and backup files -- which means a file deleted on the source system would also be deleted on the backup system. Fine until you find out a month later that it's been deleted and you want it back. Am I right rsync experts?
Only if you use the options "delete on destination"


EDIT oeps, already answered

Last edited by repo; 08-14-2009 at 12:04 PM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 03:53 AM
backup files, tar, do i need to make a copy dtra Linux - Software 3 05-10-2005 09:52 PM
permissions on tar backup files durden2.0 Linux - Newbie 4 08-04-2004 12:50 AM
restoring /etc files from tar backup hdagelic Linux - General 1 09-24-2003 08:04 AM
backup/verify files with tar hokri Linux - General 0 11-27-2001 07:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration