SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Space in the directory name
Author Message
Post Space in the directory name 
Hello everybody,

I've tried everything and nothing seams to work. How can I backup an
directory with a space in it's name? I've tried /path/to/dir\ with\
space/ or "/path/to/dir with space", but rdiff-backup crashes on this.
It can't find the correct directory. It either thinks that every
directory is a separate directory or it thinks that the " are part of
the directory name. Both cases make the backup fail. How to fix?

Regards,
Cybertinus


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Space in the directory name 
On Thursday 11 February 2010 3:12:57 pm Cybertinus wrote:
Hello everybody,

I've tried everything and nothing seams to work. How can I backup an
directory with a space in it's name? I've tried /path/to/dir\ with\
space/ or "/path/to/dir with space", but rdiff-backup crashes on this.
It can't find the correct directory. It either thinks that every
directory is a separate directory or it thinks that the " are part of
the directory name. Both cases make the backup fail. How to fix?

Regards,
Cybertinus


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL:
http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

How about:
/path/to/"dir with space"
--
Adrian Klaver
adrian.klaver < at > gmail.com


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Space in the directory name 
Adrian Klaver spake thusly on 02/11/2010 05:16 PM:
On Thursday 11 February 2010 3:12:57 pm Cybertinus wrote:
Hello everybody,

I've tried everything and nothing seams to work. How can I backup an
directory with a space in it's name? I've tried /path/to/dir\ with\
space/ or "/path/to/dir with space", but rdiff-backup crashes on this.
It can't find the correct directory. It either thinks that every
directory is a separate directory or it thinks that the " are part of
the directory name. Both cases make the backup fail. How to fix?

Regards,
Cybertinus


How about:
/path/to/"dir with space"


I know rdiff-backup handles spaces in filenames fine in the tree, but
was wondering if this was an issue just with the source dir as specified
on the command line, so I tried with creating:

temp
-->A B
-->C

And creating file "A B/test.txt", and then:

temp$ rdiff-backup A\ B C

And that worked fine. (Note: I didn't try with absolute paths.) I also
created subdirs under "A B" with a file in one of them and that was okay
also. Have you experimented with some different scenarios on a smaller
scale to see if you can reproduce it in different ways?

Scott


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post Space in the directory name 
On 12/02/10 00:35, Scott Carpenter wrote: Adrian Klaver spake thusly on 02/11/2010 05:16 PM:
On Thursday 11 February 2010 3:12:57 pm Cybertinus wrote:
Hello everybody,

I've tried everything and nothing seams to work. How can I backup an
directory with a space in it's name? I've tried /path/to/dir with
space/ or "/path/to/dir with space", but rdiff-backup crashes on this.
It can't find the correct directory. It either thinks that every
directory is a separate directory or it thinks that the " are part of
the directory name. Both cases make the backup fail. How to fix?

Regards,
Cybertinus


How about:
/path/to/"dir with space"


I know rdiff-backup handles spaces in filenames fine in the tree, but was wondering if this was an issue just with the source dir as specified on the command line, so I tried with creating:

temp
-->A B
-->C

And creating file "A B/test.txt", and then:

temp$ rdiff-backup A B C

And that worked fine. (Note: I didn't try with absolute paths.) I also created subdirs under "A B" with a file in one of them and that was okay also. Have you experimented with some different scenarios on a smaller scale to see if you can reproduce it in different ways?

Scott


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org ([email]rdiff-backup-users < at > nongnu.org[/email])
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Hello,

Thanks for the tips Adrian and Scott. And sorry for my late reply, I had to do some other things. I haven't tested Scotts solution, but I trust that it works.

I found the core of my problem. I've written a few bash scripts to create my backups. 1 file is the core of the backupscript and this is the file which actually backups everything. The other files (I have 3 of them now) are nothing more then configuration files. In that configuration file I configure which directories should be backuped and how long they should be saved. This way I have 1 script for the actual backup and I can create different backup sets Smile. A config file looked like this:
#!/bin/bash

export DIRS='/home/mysql /home/svn /home/cybertinus/bash /root/bash /home/cybertinus/localhost /home/cybertinus/mail /home/cybertinus/dir with spaces'
export TIME_SAVED='2D'
(This is my file for my hourly backup)
And in my core script I just looped through all the fields in DIRS, and calling rdiff-backup for each directory. The problem was that I used the space as the seperator for different directories. All I needed to do was change it to a , or a : and then I could use spaces in my directories.
So I added the line IFS=, to my core script, changed all the configs to seperate the dirs with , and now everything works Smile.

Thnx for helping me Smile.

Regards, Cybertinus

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB