-   Linux - Newbie (
-   -   backup command: 'dump' and 'pax' => correct syntax usage (

dragonetti 09-27-2011 06:09 PM

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):

cheesus 10-08-2011 10:47 AM


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.

dragonetti 10-10-2011 12:56 AM


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!

cheesus 10-10-2011 02:17 AM

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.


All times are GMT -5. The time now is 07:04 AM.