RARing with Linux?


Recommended Posts

Hey all,

I'm having some problems...I'm trying to back up my /home directory (I Need to transfer my stuff to a new PC) and I want to have them in a rar file called Backup <date goes here>.rar. However, I'd like to do this in archives, with 3 gigs per archive.

Example:

Backup <date>.part1.rar

Backup <date>.part2.rar

I can't seem to find how to do this in file roller, and command line rar is complicated for me...anyone have any ideas on how to do this?

Thanks in Advanced!

Link to comment
Share on other sites

Thanks sttroopers, now I need to figure out how to actually get it done.

And I like .rar better, but if you can tell me how to do it in .tar, I'd do it that way also.

Link to comment
Share on other sites

Tar is definately the better way to backup data. I just read the man and did a little experiment with the multi-tar archiving and it works pretty well. Unfortunately, it is designed for tape drives, so it expects that you are switching tapes between archives, but it still works on a hard drive. (BTW, tar has a 2GB limit on Linux, IIRC). So...

tar -M -L 2000000 -cf backup.tar /home&lt;enter&gt;
&lt;it will fill the tar until it reaches 2GB&gt; then ask you to switch "tapes"&gt;
Prepare volume #2 for `backup.tar' and hit return:&lt;before hitting return, mv backup.tar to backup.tar.1&gt;
Prepare volume #3 for `backup.tar' and hit return:&lt;before hitting return, mv backup.tar to backup.tar.2&gt;

Continue like that until all the tars have been created, and you should have a directory full of backup.tar.1, backup.tar.2, backup.tar.3, and so on. You could bzip2 'em, but that could take all day in itself. When it comes time to extract go back into the dir with all the archives, and:

mv backup.tar.1 backup.tar
tar -xf backup.tar -C /&lt;it should ask for the next file automatically.  when that happens, mv backup.tar.2 to backup.tar and continue.&gt;

Now I'm sure there is an easier way, but the man isn't very helpful. I'm sure there are some great scripts out there too.

Link to comment
Share on other sites

To use command line rar, just use this:

rar a -m3 -v3000000k Backup-`date -Idate`.rar /home

(note - set -m to be your preferred compression level from 0 - 5 (5 is highest, 0 is lowest))

This should automatically split it up into volumes of 3gigs each with a part01, part02, ... partNN.

As Mr. Static Void said though, this is likely to take a while ;)

Link to comment
Share on other sites

To use command line rar, just use this:

rar a -m3 -v3000000k Backup-`date -Idate`.rar /home

(note - set -m to be your preferred compression level from 0 - 5 (5 is highest, 0 is lowest))

This should automatically split it up into volumes of 3gigs each with a part01, part02, ... partNN.

As Mr. Static Void said though, this is likely to take a while ;)

Good one. (Y)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.