LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-20-2008, 03:54 AM   #1
ekamlesh
Member
 
Registered: Jun 2008
Distribution: Debian Wheezy
Posts: 43

Rep: Reputation: 17
backup


I want to backup a 20 GB folder using tar. The question is how to tell tar to create a tar files of size 4.2 GB only so that it is possible to write them on a DVD.
 
Old 12-20-2008, 04:09 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You may be able to use the -L option with tar, but when I've needed to limit the size, I've simply created a large tarball, then run it through split (since, as I recall, -L doesn't mix with compression).

I'm sure you could pipe the tarball directly through split if you wanted.

See man split
 
Old 12-21-2008, 10:59 PM   #3
ekamlesh
Member
 
Registered: Jun 2008
Distribution: Debian Wheezy
Posts: 43

Original Poster
Rep: Reputation: 17
I followed billymayday's suggestion and created huge tar ball of my back up. But I have the following problem. Tar is able to read [while extracting files] only the first file created by split (i.e xaa), but for other files(xab,xac, ..), it just says that it is an empty archive. Do i need to do something more, or I am missing something. Please guide me. Thanks in advance.
 
Old 12-21-2008, 11:09 PM   #4
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
This is an old and established option of tar for tape backups. You should be using tar with -cML options.

See: http://www.gnu.org/software/tar/manu...ia.html#SEC156

Create your multi-volume tar backups and copy each volume to your CD or DVD.

Last edited by AuroraCA; 12-21-2008 at 11:13 PM.
 
Old 12-21-2008, 11:51 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
If you split them, you need to rejoin (with cat)
 
Old 12-22-2008, 12:38 AM   #6
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
@ekamlesh

Code:
cat x* > big-tar-file.tar
Assuming you used the default naming scheme of split.

Replace the red with your actual files.

When you plan to restore your files make sure you have enough drive space.

The splitted tar files plus the final full version will require about 40G of drive space. After you've created the full version, you can delete the splitted tar files.

I prefer using rsync when backing up files, and when used with the delete option, it makes a mirror copy of the source and destination folders.

Be careful though, if you misuse the delete option, it can delete files you didn't want deleted. See the man page for rsync or google it.

- Cheers

Last edited by dv502; 12-22-2008 at 01:53 AM.
 
  


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
how to create backup MYSQL Script to backup my database for every 1hour RMLinux Linux - Newbie 3 11-20-2008 10:13 AM
LXer: Automatic backup for sporadically connected clients with Box Backup LXer Syndicated Linux News 0 08-29-2008 08:40 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 03:39 AM
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 03:40 PM
Selective backup to CDRW, or other backup methods. trekk Linux - Software 1 11-03-2003 02:46 PM

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

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