LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 05:06 PM   #1
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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, 05:12 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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, 05:30 PM   #3
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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 06:09 PM.
 
Old 09-04-2013, 06:12 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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-04-2013, 11:33 PM   #5
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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-04-2013, 11:50 PM   #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, 12:36 AM   #7
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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 01:51 AM.
 
Old 09-05-2013, 02: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, 03:25 AM   #9
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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, 03:26 AM   #10
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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, 03:41 AM   #11
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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-06-2013, 11:35 PM   #12
mmhs
Member
 
Registered: Oct 2010
Posts: 101

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


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

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

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