Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#444 closed defect (fixed)

It seems impossible to specify for mondo a path to include with "-I" CLI option if name contains spaces

Reported by: Talamona Francesco Owned by: Bruno Cornec
Priority: normal Milestone: 2.2.9.5
Component: mondo Version: 2.2.9.4
Severity: normal Keywords:
Cc:

Description

From a recent thread on the mailing list:

The command line option "-I" doesn't know how to handle spaces in folder names:

I can back up a folder if I'm in it:

cd /home/alex/Spass\ und\ Hobby/Musik
mondoarchive -Oi -I .  -d /tmp

this command works, but is unclear how to pass the include path, mondo claims that cannot find the folder to include if I try to specify the folder explicitly

I use a simple script to run mondoarchive, so I did some more testing with the syntax used (and proven to be correct) there:

INCLDIR="/home/alex/Spass\ und\ Hobby/Musik"
mondoarchive -Oi -I "${INCLDIR}" -d /tmp

doesn't work, but

mondoarchive -Oi -I /home/alex/ -E "${INCLDIR}" -d /tmp

works. So the same syntax that's ok for the -E switch isn't accepted for -I

As a side note it's interesting that -I ""/home/alex/Spass und Hobby/Musik"" and -I /home/alex/Spass und Hobby/Musik both give a segmentation fault.

Mondo version used for testing: 2.2.9.4.1

Change History (5)

comment:1 by Talamona Francesco, 13 years ago

Milestone: 2.2.9.5

Checked with latest testing version, the issue is present, this is the errore message:

Fatal error... ERROR ! You specified a directory to include which doesn't exist

But when I'm in the folder to backup and run mondo with:

mondoarchive -Oi -I .  -d /tmp

I get this message

Making catalog of files to be backed up
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `find '' -maxdepth 3 -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o   -path /var/cache/mondo -prune -o -path (null) -prune -o -path /mnt/bulk/mondo.tmp.gFB1g4 -prune -o -path /mnt/bulk/mondo.scratch.17767/mondo.scratch.4551 -prune -o -path . -prune -o -path .. -prune -o -path /mnt/cdrom -prune -o -path /mnt/floppy -prune -o -path /media -prune -o -path /tmp -prune -o -path /proc -prune -o -path /sys -prune -o -path /dev/shm -prune -o -path /var/cache/mindi -prune -o -type d -print > /mnt/bulk/mondo.tmp.gFB1g4/tmpfs/skeleton.txt 2> /dev/null'
wc: /mnt/bulk/mondo.tmp.gFB1g4/tmpfs/skeleton.txt: No such file or directory
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `find '.' -maxdepth 3 -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o   -path /var/cache/mondo -prune -o -path (null) -prune -o -path /mnt/bulk/mondo.tmp.gFB1g4 -prune -o -path /mnt/bulk/mondo.scratch.17767/mondo.scratch.4551 -prune -o -path . -prune -o -path .. -prune -o -path /mnt/cdrom -prune -o -path /mnt/floppy -prune -o -path /media -prune -o -path /tmp -prune -o -path /proc -prune -o -path /sys -prune -o -path /dev/shm -prune -o -path /var/cache/mindi -prune -o -type d -print > /mnt/bulk/mondo.tmp.gFB1g4/tmpfs/skeleton.txt 2> /dev/null'
wc: /mnt/bulk/mondo.tmp.gFB1g4/tmpfs/skeleton.txt: No such file or directory
Done.

In spite of the "syntax error near unexpected token" the backup runs.

comment:2 by Bruno Cornec, 13 years ago

Status: newassigned
Version: 2.2.9.4

Reproduced both problems.

comment:3 by Bruno Cornec, 13 years ago

Tose problems are fixed as of rev [2714]. I produced a new gentoo package for you to test. At ftp://ftp.mondorescue.org/test gentoo/nover/i386/mondo-2.2.9.5_p20110202123354.ebuild gentoo/nover/i386/mindi-2.0.7.6_p20110202123354.ebuild

WARNING: Syntax of excluded dir has then changed: Instead of having space separated dirs, you now need to have them pipe-separated:

-E "/path to 1|/path to 2"

Please report back your findings.

comment:4 by Bruno Cornec, 13 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in 2.2.9.5 official. Please reopen if not.

comment:5 by Talamona Francesco, 13 years ago

Right now I'm unable to check, due to other open issues. I'll check ASAP, in the meantime I consider it fixed.

Note: See TracTickets for help on using tickets.