LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-07-2007, 07:15 PM   #1
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Slackware backup


I haven't been able to find any resources on how build and maintain a full backup of my current linux system. Does anyone know a good way or have a link with info.


Thanks for you time and info.
 
Old 04-07-2007, 07:21 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Try here:
http://freshmeat.net/search/?q=backu...&Go.x=0&Go.y=0
 
Old 04-09-2007, 02:28 PM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by Hern_28
I haven't been able to find any resources on how build and maintain a full backup of my current linux system. Does anyone know a good way or have a link with info.

Thanks for you time and info.
That's pretty hard to believe as its one of the most common topics in the entire world.

There are a lot of choices, depending on how important your data is, how much money you have to throw at the problem, and what you're trying to accomplish.

The simplest way is to make tarballs of your filesystems. All you have to do to restore things if you lose your system is to start a live CD, make filesystems, untar into the partition(s), and rerun your boot loader config (or maybe not even).

There are some utilities like partimage which make backups for you through a ncurses interface.

You can copy your filesystems to other partitions on the same drive or another drive in the same box. This is fine if you make a mistake like doing rm -rf / as root but if you lose the disk you're out of luck.

You can copy your filesystems to another drive in the same box but you're out of luck if a gas main lets go and blows up your neighborhood. Actually with this scenario if you're in your house at the time you probably won't need to restore your system

You can rsync your filesystems to another location or another drive or another partition. rsync is nice because it does incremental backups. After the first time it just copies the changes.

You can use rsync to do local backups but it also works over a comm link. You can back up to a remote system or another box on your lan.

I have a cron job which copies my main desktop system which I can't really afford to lose to another drive in the same box. I excluded a couple of key files like fstab. I can boot into the recovery system and it's just like home.

Whatever you do make sure you test it out. I found a small flaw in my plan recently when I did actually lose my system due to operator error.

Last edited by Randux; 04-09-2007 at 02:35 PM.
 
Old 04-09-2007, 02:31 PM   #4
cjunevicus
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Rep: Reputation: 15
Cool BackupPC is a great tool for backing up systems

We have a how to on www.adminsparadise.com that runs through the backuppc install.

Very soon we will have a cd that will automate the install of a backup server.. stay tuned.

Adminsparadise -- let us do the admin work for you!
 
Old 04-20-2007, 07:01 PM   #5
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Original Poster
Rep: Reputation: 38
I know this thread is old but

hey Randux.

Do you have a how to or a link to one where i can rsync linux to another partition and keep 2 working copies of my system?
 
Old 04-21-2007, 04:44 PM   #6
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by Hern_28
hey Randux.

Do you have a how to or a link to one where i can rsync linux to another partition and keep 2 working copies of my system?
Hi Hern,

There are a lot of guys who know a lot more than me on this forum so I didn't consider any how-to. I usually try to help out on the multibooting questions since I do a lot of that.

Basically what rsync is is program that copies stuff over a tcp connection. They added a lot of features to make it smarter and it can tell if a file has been modified from the source. I got started on this project by using rsync on the command line to make sure I understood what it was doing. There are a lot of options but the main ones to use to get started without doing anything bad to yourself are -axvn.

-a means do an archive. it recurses into directories (gets everything) and saves the permissions and times.

-x means stay on a mounted filesystem. If you have a complicated setup with mounts to all kinds of other stuff (NFS shares, etc) you can really cause problems for yourself if you forget what you're doing so -x will keep you on the one mounted filesystem

-v means verbose, show all of what rsync is doing

-n means don't do anything, it just goes through the motions of finding and comparing files but doesn't do anything. You can use all these options to check if rsync is understanding your command like you want it to.

The other thing that's important with rsync is to use trailing / for directories. If not, you can get files all over the place. There are some simple example commands in the rsync man page, just remember to always use -vn to see what you're doing and you won't hurt yourself.

What I did was to create partitions the same size as I wanted to back up. If you have mountpoints for root (/) home and opt for example, create three partitions and make filesystems in each one.

Then you can have a script that does something like

mount /dev/hdx /mnt/altroot
rsync -axv --exlude-from=my.exclusion.file // /mnt/altroot/

and do a set of these for each partition.

The exclusion file is a nice way to be able to prevent copying junk you don't want. All the stuff like your .Xauthority files and whatever other things you don't need to waste time copying can be entered into a text file and then you can use that as input to rsync.

The other thing that's nice about rsync is it can delete stuff on the receiving filesystem if the sending filesystem doesn't have it. For example if you have tons of emails you get every day and you keep backing up your system, all this junk will accumulate on your backup system, because you didn't do anything to delete it. So you can add --delete to your rsync command and it will first delete everything on the target filesystem that doesn't show up on the source filesystem, and then copy whatever needs to be backed up. You can change the order to delete it last, etc. Deleting it first is the default and it's a pretty nice idea since after you delete the files you don't need there will be more space for what you do need.

To get something like this working is not a big deal. You have to know what you want to backup and what you don't need to back up. You have to play around with rsync and cron a little to get the idea of how often you want to back up and what exactly you have to do for commands. Start with a simple script and make sure you check all the exit codes from whatever you run. Try to boot into your secondary system to make sure everything is there. Hint: you will want to exclude fstab after the initial copy! It's a good idea to use rsync to copy the whole system the first time and then decide what you don't want to modify, etc.
 
Old 04-21-2007, 05:44 PM   #7
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Original Poster
Rep: Reputation: 38
lol

actually got it to work before reading the post ( my luck ) now have a full running backup of the current system. Thanks for the info tho man.
 
Old 04-30-2007, 11:02 AM   #8
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
now the next time somebody wants a tutorial on backups, you can add your experience to the thread
 
Old 05-18-2007, 02:46 PM   #9
cjunevicus
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Rep: Reputation: 15
Backuppc on Adminsparadise ISO

We've made installing a backup server a piece of cake.
The AdminsParadise Backuppc server automates the installation and configuration of the Backuppc server.. installing all the required packages, adding the backuppc user, and configuring Apache to use the backuppc account.

You can now backup Windows linux and macs via a network backup.

I hope it is found useful and our goal is to save your valuable time by automating the process.

We will be introducing flash movie guides and tutorials on how to use this excellent piece of software.

later..
 
  


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
How-To make a Full Backup of Slackware 11.0 slackamp Slackware 1 11-08-2006 03:02 PM
Install Slackware from backup disk snalion Linux - Newbie 7 08-22-2006 04:26 PM
How Do U Backup Slackware??? choco Slackware 6 10-09-2003 01:10 AM
Old slackware tape backup - need to restore rah Slackware 14 04-09-2003 11:51 PM
Slackware backup slackerboy Slackware 4 01-11-2003 12:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:43 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
Open Source Consulting | Domain Registration