LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-04-2013, 06:06 PM   #1
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Rep: Reputation: 1
backup problem


hi guys
i have a problem

i want to make a full backup from all files and directories in linux.

i use tar command to make a full backup .
but unfortunately my backup does not contain so ( share object ) files .!!

how can i make a backup from all directories and file even so (share object) files.

and another question is about find command . i decide to make a backup with cpio but find command doesnt show so files !!

find cannot show so files when i search a path to find modules (so ) files.

find /etc -name \*.so -print ----> no result !!

tar cpvzf backup /etc ----> it does not contain so files and other files , which are not regular files !!

thx in advance
 
Old 09-04-2013, 06:12 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,207

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Quote:
Originally Posted by mmhs View Post
find /etc -name \*.so -print ----> no result !!
Why would you put a backslash in front of the asterick? You are looking for a single file named "star-dot-s-o" by doing that. I'm not surprised you don't have that particular file on your system.
 
Old 09-04-2013, 06:30 PM   #3
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by haertig View Post
Why would you put a backslash in front of the asterick? You are looking for a single file named "star-dot-s-o" by doing that. I'm not surprised you don't have that particular file on your system.

u do that without \ !!!
it does not change the result !!

lets search conf file in /etc with \ ! find /etc -name \*.conf . ! do u get unexpected result ???????

it's not bad to take a look at this !!!to learn how that work !!
http://content.hccfl.edu/pollock/Unix/FindCmd.htm

find -name -name \*.txt -print !!!!!!!!!

or

find dir_name -type f \( -name \*.txt -o -name '*some-name*' -o '*other*' \)

Last edited by mmhs; 09-04-2013 at 07:09 PM.
 
Old 09-04-2013, 07:12 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,207

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
I did not initially notice your lack of quotes in the find command. I always use them myself, but I now see that you don't, which is fine.

There is a difference between:

find . -name "*.conf" -print

and

find . -name "\*.conf" -print

... which is what I was describing. My error for not noticing your lack of quotes in your initial post. Sorry about that.

Quote:
tar cpvzf backup /etc ----> it does not contain so files and other files , which are not regular files !!
Maybe I'm reading your above sentence differently than you intended, but *.so files ARE regular files.
Could be you actually meant "it does not contain so files, and other files that are not regular files"

Whatever, *.so files SHOULD be included in your backups given the way you wrote the tar command in your example. I have no idea why they are not.
 
Old 09-05-2013, 12:33 AM   #5
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by haertig View Post
I did not initially notice your lack of quotes in the find command. I always use them myself, but I now see that you don't, which is fine.

There is a difference between:

find . -name "*.conf" -print

and

find . -name "\*.conf" -print

... which is what I was describing. My error for not noticing your lack of quotes in your initial post. Sorry about that.



Maybe I'm reading your above sentence differently than you intended, but *.so files ARE regular files.
Could be you actually meant "it does not contain so files, and other files that are not regular files"

Whatever, *.so files SHOULD be included in your backups given the way you wrote the tar command in your example. I have no idea why they are not.

thx man for your reply .
but still i have problem !

is there any idead ?????????HELP ME PLZ
 
Old 09-05-2013, 12:50 AM   #6
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
First, please post the complete command you're using to make the backup.
Second, are you executing this command as root or a normal user?

Cheers
 
Old 09-05-2013, 01:36 AM   #7
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by gdejonge View Post
First, please post the complete command you're using to make the backup.
Second, are you executing this command as root or a normal user?

Cheers
hi see the first post

i used

tar cpvzf httpd-backup.tar.gz /etc/httpd !!

i execute command as root !!!

Last edited by mmhs; 09-05-2013 at 02:51 AM.
 
Old 09-05-2013, 03:03 AM   #8
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Normally I don't expect to find library files in the /etc directory.

I did a check on my system and indeed the only .so files I can find are those in /etc/alternatives which are soft-links to files in /usr/lib and /usr/lib32.

Doing a tar -cpzvf test.tar /etc backups those links without a problem.

System tested Kubuntu 12.04.
You did not tell us what distro/version you are using, so we will not be able to tell you what's normal for your system.

Cheers
 
Old 09-05-2013, 04:25 AM   #9
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,117

Rep: Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549
Using tar is a very old way to backup. TAR stands for TapeARchive. Tape drives cannot accommodate thousands of small files, and the tape sector sizes are sometimes different than a disk drive, so operators once used tar to make one large file and then streamed it to tape using dd, or the opposite, which also works.

But now you can stream dd through gzip and make compressed backups quite a bit faster than tar. And, the dd generated backups when restored to a completely lost system will still boot the system. All you need to do is restore the backup, and the system is complete. See: http://www.linuxquestions.org/questi...ommand-362506/
 
Old 09-05-2013, 04:26 AM   #10
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by gdejonge View Post
Normally I don't expect to find library files in the /etc directory.

I did a check on my system and indeed the only .so files I can find are those in /etc/alternatives which are soft-links to files in /usr/lib and /usr/lib32.

Doing a tar -cpzvf test.tar /etc backups those links without a problem.

System tested Kubuntu 12.04.
You did not tell us what distro/version you are using, so we will not be able to tell you what's normal for your system.

Cheers
so files are apache modules like mod_ssl.so mod_ldap.so mod_authnz_ldap.so and so on ...
if u have apache u can find them in /etc/httpd/modules

my distro is centos 6.4 . and i used tar (GNU tar) 1.23.
 
Old 09-05-2013, 04:41 AM   #11
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by AwesomeMachine View Post
Using tar is a very old way to backup. TAR stands for TapeARchive. Tape drives cannot accommodate thousands of small files, and the tape sector sizes are sometimes different than a disk drive, so operators once used tar to make one large file and then streamed it to tape using dd, or the opposite, which also works.

But now you can stream dd through gzip and make compressed backups quite a bit faster than tar. And, the dd generated backups when restored to a completely lost system will still boot the system. All you need to do is restore the backup, and the system is complete. See: http://www.linuxquestions.org/questi...ommand-362506/
thx man but problem is dd cannot make a copy from a directory !
i want to backup from /etc/httpd/ and dd cannot do that . dd if=/etc/httpd of=/mnt/apache bs=64k conv=notrunc,noerror it does not work !
 
Old 09-07-2013, 12:35 AM   #12
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
no one ?????
 
  


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
Problem with Backup peddip Linux - Server 3 02-26-2009 09:50 PM
backup problem saran_sai Linux - Newbie 6 12-09-2008 11:49 PM
Backup problem (AGAIN) plisken Linux - General 2 11-28-2005 06:36 AM
Backup problem svyshna Linux - General 1 10-17-2005 04:17 PM
Help with Backup problem MrJoshua Linux - Newbie 0 04-08-2002 02:53 PM

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

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