rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Space in the directory name


From: Cybertinus
Subject: Re: [rdiff-backup-users] Space in the directory name
Date: Sun, 14 Feb 2010 22:55:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100213 Thunderbird/3.0.1

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 address@hidden
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 :). 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 :).

Thnx for helping me :).

Regards, Cybertinus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]