Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-27-2011, 07:09 PM   #1
LQ Newbie
Registered: Sep 2011
Posts: 19

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):
=> see reaction user: Augur

The path to the backup file: /restr/databackup1

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

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, 11:47 AM   #2
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 184

Rep: Reputation: 25
pax -w  -f /restr/databackup1 -s '//proc/' -s '//lost+found/' -s '//sys/' -s '//dev/' -s '//mnt/' -s '//media/'
From man pax:
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, 01:56 AM   #3
LQ Newbie
Registered: Sep 2011
Posts: 19

Original Poster
Rep: Reputation: Disabled

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, 03:17 AM   #4
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 184

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.

1 members found this post helpful.


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

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration