LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 07-29-2006, 07:08 AM   #1
magasem
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Rep: Reputation: 0
Backup and restore


How can I build procedure it contains on commands to make Backup and restoring to my system ?
 
Old 07-29-2006, 07:19 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
please tell us the files you intend to backup. how do you want it backup-ed and how you want to restore it. it's also possible that tar or rsync is enough for you.
 
Old 07-29-2006, 05:36 PM   #3
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
Being a newbie I had the same question konsoldebox... Didn't know if it was approprate to jump in the middle of someone's else post but if it helps people I don't really see any harm. You asked about the files magasem wanted to backup ? In my case it is the files that make Slackware work, I'm getting better at the chanelog updates and can get mybox updated. Normally I just download the files into a created directory and install them all at once. I don't think there would be a problem figureing out how to tar them into a tarball although I haven't done that before and save then. What I need to know and do if possible is after I get everything going is to be able to save the key stuff so that when ( and yes I will ) I total screw everything up by trying to complie a new program ( Cant find everything I need in those nice slackware packages ) be able to fix it. It would be nice to have something like a restore point so when I do make a mistake I can boot a live cd , make a few changes, and be back going again without having to format and install again. I created a partition for just files but need help with the command and process.
 
Old 07-29-2006, 07:25 PM   #4
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by davimint
It would be nice to have something like a restore point so when I do make a mistake I can boot a live cd , make a few changes, and be back going again without having to format and install again. I created a partition for just files but need help with the command and process.
Hello there.

I guess you need to make a script for this. But before you make a script, you must first have an idea of how the program will work.

How about making an archive of the list of files of each of the packages you installed. Note that the lists must specify which can be easily deleted and which requires modification. The files that require modification is the difficult part.

Then before making an install of the same package with a newer version, back-up the files with tar from the list then save them as package-version-#.tgz or package-version-date.tgz.

Then install the package with a new version. Save it in a list again. Then there you go. If the new package you installed made an error, you can easily delete the new files then restore the old files.

If you think the process is already correct, do this manually first. Then try to compile it little by little as a script.

I can help you make the script but I want you to help yourself too. I recommend you first read some of the basics of bash scripting:

Bash Beginner's Guide:
http://www.tldp.org/LDP/Bash-Beginne...tml/index.html

Advanced Bash Scripting Guide
http://www.faqs.org/docs/abs/HTML/

If you're lost in the console, you can always have 'help' and 'man bash' handy.

There's also a web version of bash's manual: http://www.gnu.org/software/bash/manual/bashref.html

For the commands btw, you can use tar and find to list the files and have them backup-ed. Usually in slackware the files that make the complicated part resides in /etc. Try doing this first on packages that don't make modifications in /etc or if the files they put there are just private.

Please tell me if I'm getting the wrong idea here. Or if you still have some questions to ask.

Regards
 
Old 07-30-2006, 12:59 AM   #5
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
konsolebox, did a little reading and wrote the following very simple scrip.
Code:
#!/bin/bash
#backup of home & etc
#file name: backup.sh
tar czf /tmp/etc.tgz /etc
tar czf /tmp/home.tgz /home
echo done
From what I understand these two directories are very important and if i blow up my x or just want to keep general configuration files they should be in these two directories. ( please advise on this if I need some other directories ) I still have to play with this and get it to move the files to my other partition but I sould be able to figure that out. I've also got to work on figuring out how to use the date(or something that changes) as the filename so it won't write over the file everytime.
My real question is back to your post. While your buidling a program from source, Most of the time the readme tells where it will be installed and alot of the time you can find documentation about dependencies on their web site but how do you know about those files it's going to change outside the programs home directory.
 
Old 07-30-2006, 01:20 AM   #6
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by davimint
My real question is back to your post. While your buidling a program from source, Most of the time the readme tells where it will be installed and alot of the time you can find documentation about dependencies on their web site but how do you know about those files it's going to change outside the programs home directory.
it's in the install section of the Makefile of the package (see MakefileHOWTO).
For most packages you can also set a custom directory to see which files are installed though i don't how this could affect the configuration by adding the '--prefix' argument when doing './configure'. e.g.
Code:
mkdir test; ./configure --prefix=./test
 
Old 07-30-2006, 12:09 PM   #7
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
Thanks, for helping me. Think I going to try out the Checkinstall program. It's offered on Slackware so I know it will work correctly. Here's a link for those that read all this. ( to homepage )

http://asic-linux.com.mx/~izto/checkinstall/

Still going to keep reading and working on the scrips just in case.

Last edited by davimint; 07-30-2006 at 02:26 PM.
 
Old 07-30-2006, 02:36 PM   #8
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Oh well. Perhaps by examining the code will answer your scripts' problems. It's a good thing you knew the program early. I'll try the program too when I go back Slackware sometime. I'd also prefer if they have a bash version of the program so that it can be easily customized.

So 'til next time. You can come back here anytime you like.
And good luck with your scripting.
 
  


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
Backup Restore to new PC tjabaut Linux - Hardware 2 07-15-2006 12:01 AM
restore backup nkeever Linux - Newbie 2 06-19-2006 10:03 AM
backup / restore 5pints Linux - Software 2 01-11-2005 10:08 AM
Backup and restore? tradewind Red Hat 2 07-02-2004 11:18 PM
RH 7.3 Backup and Restore MrJoshua Linux - General 1 06-18-2003 12:39 PM


All times are GMT -5. The time now is 04:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration