LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 07: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, 07:22 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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 07:28 AM.
 
Old 08-14-2009, 07:26 AM   #3
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

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 07:27 AM.
 
Old 08-14-2009, 08:30 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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, 08:52 AM   #5
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

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, 09: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, 11:02 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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 11:04 AM.
 
  


Reply



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 02:53 AM
backup files, tar, do i need to make a copy dtra Linux - Software 3 05-10-2005 08:52 PM
permissions on tar backup files durden2.0 Linux - Newbie 4 08-03-2004 11:50 PM
restoring /etc files from tar backup hdagelic Linux - General 1 09-24-2003 07:04 AM
backup/verify files with tar hokri Linux - General 0 11-27-2001 06:05 AM

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

All times are GMT -5. The time now is 11:33 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