LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-27-2011, 06:09 PM   #1
dragonetti
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Rep: Reputation: Disabled
backup command: 'dump' and 'pax' => correct syntax usage


I'm trying to use the 2 commands "dump" and "pax" for a full system backup of an ubuntu VPS.
  • Problem with "dump": restoration failing when restoring 'var' dir
  • Problem with "Pax": backup command not working, hangs directly after pressing 'enter' (the file 'databackup1' get's created but size stays '0', no increase in size)
    The command I try (see below) includes some directory exclusions.

I have read:
- the man pages
- tutorials on the net

It's shameful, because the syntaxt construction is given in the man-pages. But still I just can't the syntaxt right.
Any help on this is very welcome.
(it's a VPS i only gave commandline access)

The reason I want to avoid TAR (if possible):
http://www.matusiak.eu/numerodix/blo...system-backup/
=> see reaction user: Augur


DUMP
The path to the backup file: /restr/databackup1

backup:
Code:
 dump -0uf databackup1
restoration:
Code:
 restore -rf /restr/databackup1
PAX
Backup (not working, command below also includes directory exclusions):

Code:
pax -w  -f /restr/databackup1 -s '//proc/' -s '//lost+found/' -s '//sys/' -s '//dev/' -s '//mnt/' -s '//media/'
Restore (no pax-backup available due to failing backup command):
 
Old 10-08-2011, 10:47 AM   #2
cheesus
Member
 
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 183

Rep: Reputation: 25
Code:
pax -w  -f /restr/databackup1 -s '//proc/' -s '//lost+found/' -s '//sys/' -s '//dev/' -s '//mnt/' -s '//media/'
From man pax:
Quote:
When no file operands are specified, a list of files to copy with one per line is read from standard input.
I do not see a file in your command, nor do you pipe filenames in there.
You need at least a "." (current directory) or "/" (filesystem root) there.

But please read also the warning on the pax man page.

Are you really running a SELinux or similar ?
I think, you will be okay with a tar or cpio backup.
 
Old 10-10-2011, 12:56 AM   #3
dragonetti
LQ Newbie
 
Registered: Sep 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
@cheesus

Thanks for those 2 important pointers!
(I didn't have selinux installed on my server).

But because PAX seems to be a bit confusing to me, I'll stick to TAR.
TAR seems to work only the "--recursive-unlink" switch seems to be giving troubles.

Thanks again cheesus!
 
Old 10-10-2011, 02:17 AM   #4
cheesus
Member
 
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 183

Rep: Reputation: 25
Well, if you want to backup e.g. the "/dev", you'll probably have to use cpio or pax.
If you're just backupping data, tar is fine.

Please rate answer and mark thread as solved.

Cheers!
 
1 members found this post helpful.
  


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
[SOLVED] correct lftp syntax mrmnemo Linux - Software 1 10-09-2010 02:31 PM
Dump and restore command usage ?? vikas027 Linux - Newbie 3 05-04-2008 09:55 PM
Correct syntax for cu jowa45 Slackware 10 11-01-2007 09:26 AM
Correct Syntax for ethtool kaplan71 Linux - Networking 1 08-21-2007 12:30 AM
what is the correct syntax shanenin Linux - Software 2 10-19-2003 12:31 PM


All times are GMT -5. The time now is 01:29 AM.

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