Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Backup Backup Backup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tuppe666
Guru
Guru


Joined: 02 Mar 2004
Posts: 423

PostPosted: Mon May 17, 2004 9:32 pm    Post subject: Backup Backup Backup Reply with quote

I missundersood catalyst I got all exited I thought a simple way to backup my hard drive programs, my adsl speedtouch modem which if fragile, my ... other bits and bobs that vanished lats time my lost+found contained all my programs and then pants I don't think it does what I really want :( so as I wondered what is the best was of backing up programs on my hard drive so I can get myself up and running as fast as possible back into gentoo. I am surprised there isn't a standard program!

Love and Kisses

Moi
Back to top
View user's profile Send private message
spamspam
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 153

PostPosted: Mon May 17, 2004 9:35 pm    Post subject: Standard program? Reply with quote

Tar
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54422
Location: 56N 3W

PostPosted: Mon May 17, 2004 9:39 pm    Post subject: Reply with quote

tuppe666,

tar to create the archive and bzip2 to compress it if you need the space.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
spamspam
Apprentice
Apprentice


Joined: 05 Dec 2003
Posts: 153

PostPosted: Mon May 17, 2004 9:45 pm    Post subject: Offline media Reply with quote

It might also be a really good idea to copy the tarball to offline media such as a tape, Zip Disk, or CDR/DVDR.
Back to top
View user's profile Send private message
billkr
n00b
n00b


Joined: 01 May 2004
Posts: 5
Location: charlottesville, virginia

PostPosted: Tue May 18, 2004 4:56 pm    Post subject: Reply with quote

Is there a way to make tar break up a large archive into chunks of a specified size? Specifically, can I use tar to break up my photo collection into 700 MB portions to burn onto cd? I have taken a look at man tar, there is a --tape-length option, but I'm not sure if this is what I'm looking for.

Thanks for any help.
Back to top
View user's profile Send private message
FrithjofEngel
n00b
n00b


Joined: 28 Feb 2003
Posts: 12

PostPosted: Tue May 18, 2004 7:07 pm    Post subject: Reply with quote

billkr wrote:
Is there a way to make tar break up a large archive into chunks of a specified size? Specifically, can I use tar to break up my photo collection into 700 MB portions to burn onto cd? I have taken a look at man tar, there is a --tape-length option, but I'm not sure if this is what I'm looking for.

It is :)
Back to top
View user's profile Send private message
bch
n00b
n00b


Joined: 05 Mar 2004
Posts: 27

PostPosted: Tue May 18, 2004 9:45 pm    Post subject: Reply with quote

Another option is the split command.

http://www.gnu.org/software/coreutils/manual/html_chapter/coreutils_5.html#SEC20

With this, you can split the tar file into arbitrary size then burn
these to cdr or dvdr then use cat to join them back together..

brent
Back to top
View user's profile Send private message
tam1138
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2003
Posts: 103

PostPosted: Wed May 19, 2004 12:30 am    Post subject: Reply with quote

bch wrote:
Another option is the split command.

http://www.gnu.org/software/coreutils/manual/html_chapter/coreutils_5.html#SEC20

With this, you can split the tar file into arbitrary size then burn
these to cdr or dvdr then use cat to join them back together..


The bummer with this method is that you need to reassemble all of the parts in order to retrieve a single file (even if that file is contained completely within a single part).
Back to top
View user's profile Send private message
spacejock
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2003
Posts: 94
Location: Australia

PostPosted: Tue Jun 15, 2004 6:06 am    Post subject: Reply with quote

Tar/bz works, but isn't there a more efficient way?

E.g. Use zip to create an archive of /etc

Use zip -u weekly to add changed files

use zip ??? to remove files no longer present on the source.

Mt FULL-etc-tar.gz files are only 8mb or so, but my FULL-usr.tar.gz is over 2gb. Re-creating that file every week when 99% of it is the same seems like a big waste of time.

I also have an rsync command which duplicates important folders onto a second drive nightly, weekly, monthly, but I use a USB disk to carry the entire system backup with daily increments from 3 servers everywhere I go - about 5gb per server. It's VFAT formatted, don't want to make it ext3, so I can't just rsync files onto it and preserve attributes. Also, I plug this disk in and grab changed tar.bz files, it's not going to sit there for 2 hours waiting to back everything up onto it.

I'm sure there's a way of listing files in the zip, checking if they exist (test -f?) and if not, removing them from the zip. Then add changed files back into the zip to finish off. Daily increments can just start with a new zip. I'll have to start investigating...

Cheers
Simon
_________________
Author of the Hal Spacejock series ... "Better than Red Dwarf" - Tom Holt
Download the first book free
Back to top
View user's profile Send private message
n3mo
l33t
l33t


Joined: 28 Mar 2004
Posts: 657
Location: In a Cruel World

PostPosted: Tue Jun 15, 2004 8:15 am    Post subject: Reply with quote

Code:
mkdir /backup
cd /
tar cpvf /backup/filename.tar --directory / --exclude=proc --exclude=mnt --exclude=backup --exclude=dev --exclude=*/lost+found .


you can put that on a script, except for for the mkdir command and run it weekly, you colud also improve the script using --tape-lenght option or using incremental backup.
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Tue Jun 15, 2004 9:06 am    Post subject: Reply with quote

you can't use zip as it won't store important stuff like links and file permissions.
Tar is a very versatile backup program, and will allow you to do incremental backups and split volume backups.
If you're short on space you can also make it bzip2 the archive by simply adding the j option.
Back to top
View user's profile Send private message
puke
Tux's lil' helper
Tux's lil' helper


Joined: 05 Oct 2002
Posts: 128

PostPosted: Tue Jun 15, 2004 9:28 am    Post subject: Reply with quote

Mondo Rescue allows you to build ISOs to image your linux box.
Back to top
View user's profile Send private message
spacejock
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2003
Posts: 94
Location: Australia

PostPosted: Tue Jun 15, 2004 10:22 am    Post subject: Reply with quote

Thanks for the reply.

From man zip:

-y Store symbolic links as such in the zip archive,
instead of compressing and storing the file
referred to by the link (UNIX only).

However, you're right about the file permissions.

I already use tar for incremental backups, and I use the z option (for gz) because it seems to be a lot faster than bz2 compression, even if the files are a bit bigger.

What I was getting at is that my system goes through a massive routine, re-creating several 1gb+ files, when most of the content is the same. I do nightly incrementals, I was just looking for a way to cut out so much activity on my server.

In fact, I wrote a script which delves into the first level directory (e.g. var) and then backs up each subfolder tree to a separate file - this splits some of the very large files up and makes copying the files over the network a bit easier. I guess another option would be do schedule the weekly backup of /var on Monday, /usr on Tuesday, etc.

Cheers
Simon
_________________
Author of the Hal Spacejock series ... "Better than Red Dwarf" - Tom Holt
Download the first book free
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Tue Jun 15, 2004 10:49 am    Post subject: Reply with quote

You might also want to take a look at rsync. It transfers only the changed files and with some shell magic it's also possible to do incremental backups with it.

http://rsync.samba.org/examples.html
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
spacejock
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2003
Posts: 94
Location: Australia

PostPosted: Tue Jun 15, 2004 11:03 am    Post subject: Reply with quote

"I also have an rsync command which duplicates important folders onto a second drive nightly, weekly, monthly,"

Actually, that should have said 'script', not 'command'. But I'm using rsync, and it's good. I wrote something similar for Windows recently, nowhere near as many features but it allow me to sync important folders onto my backup disks, based on file modification time.

Cheers
Simon
_________________
Author of the Hal Spacejock series ... "Better than Red Dwarf" - Tom Holt
Download the first book free
Back to top
View user's profile Send private message
eelleemmeenntt
n00b
n00b


Joined: 02 Jul 2004
Posts: 6
Location: London Ont. Canada

PostPosted: Thu Jul 22, 2004 1:26 am    Post subject: Reply with quote

Hey I have two bash scripts that work differently for backup. One uses rsync and the other rdiff_backup. Feel free to use. I hope they help......

http://publish.uwo.ca/~nelkadri/
_________________
Haunted-Cave
Back to top
View user's profile Send private message
Kraymer
Guru
Guru


Joined: 27 Aug 2003
Posts: 349
Location: Germany

PostPosted: Mon Aug 16, 2004 10:00 am    Post subject: rdiff-backup Reply with quote

Hi there!

I was looking for something similar and don't want to stick to the tar-bzip2-solution. Looking in portage with '-s backup', I found rdiff-backup which looks quite interesting; although your data won't be compressed automatically.

Sebastian
Back to top
View user's profile Send private message
blscreen
Tux's lil' helper
Tux's lil' helper


Joined: 04 Mar 2003
Posts: 118
Location: Innsbruck

PostPosted: Mon Aug 16, 2004 12:30 pm    Post subject: Reply with quote

I use a rdiff-backup server in my small home network and it has saved me several times :)

rdiff-backup mirrors your backup-data uncompressed. But if a file changes, rdiff-backup saves the new version together with the compressed differences between the versions, so you can restore files from the past.

The idea of not compressing the main mirror is that in case of a complete loss you can use the backup data as a readonly fileserver in seconds.

The drawback is that you need more space for the initial backup, but after that the backuptree wil grow slowly. I have a 12 GB backup partition for user data, and I can keep increments going back several months.
Back to top
View user's profile Send private message
rzZzn
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2004
Posts: 96
Location: Sweden

PostPosted: Tue Aug 24, 2004 7:29 am    Post subject: Reply with quote

I use webmin
Back to top
View user's profile Send private message
mazirian
Apprentice
Apprentice


Joined: 26 Jun 2003
Posts: 273
Location: Yarmouth, ME

PostPosted: Tue Aug 24, 2004 6:18 pm    Post subject: Reply with quote

I second blscreen's reccomendation of rdiff-backup, that's agreat package.

cpio is also a useful tool also. From what i understand, it may have some advantages over tar if anything gets corrupted. That may be bs, I don't know.

I just started using it to back up my home directory with the following:

Quote:

find /home/bowman | cpio -o -Hnewc | bzip2 > perciplex-home-bowman-$(date +%F).cpio.bz2
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum