[Borgbackup] borg create: it's really difficult to get wildcard expansions correct
Billy Charlton
billy at worldofbilly.com
Wed Dec 23 17:10:42 EST 2015
I'm having a lot of difficulty getting a borg create command written just
right for backing up my home directory. What seems like should be a simple
and common task has taken me hours of fiddling and it still isn't correct.
I'm wondering if the wildcard expansion logic needs some work.
I've been following https://github.com/borgbackup/borg/issues/43 but I
don't see a solution yet.
Here's what I want to do:
- I want to back up everything in my home directory, except for my
dotfiles, dot folders, and one folder called "AppData".
- I don't want any of the leading folder names stored in the archive's file
paths, because I may be restoring to a different platform. My laptop has my
home folder in /home/billy, while my windows desktop's home is seen as
/cygdrive/c/users/Billy. So its best for me to leave all that out and just
backup from the relative safety of my home folder.
- I can't rely on shell expansion because many of the folders and filenames
have spaces.
So, I feel like this command should work:
cd ~
borg create -v --exclude "./AppData" --exclude ".*" test::mybackup .
but that second exclude is apparently excluding ALL files. Why is that?
Shouldn't it just exclude files and folders that begin with "."?
- If I change it to --exclude "./.*" --> it excludes all files again, which
makes no sense to me.
- If I change it to --exclude "./.*/" --> it almost works: regular folders
and files get archived; the *contents* of dot folders are not archived; but
all dot files in the home folder as well as the dot folder names themselves
(but not their contents) get archived.
This all seems befuddling to me. Am I missing something?
(This is using borg 0.29.0 on a cygwin install.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/borgbackup/attachments/20151223/4f49de53/attachment.html>
More information about the Borgbackup
mailing list