SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
couple of questions
Author Message
Post couple of questions 
Hi,
I want to backup a linux pc and only the home directory and its
subdirectories /home/username/
but i don't want to backup hidden directorys like .kde or .ssh or stuff like
that and also not *.mp3 which can be everywhere files.

I will use rsync for it
is this a correct setting?
$Conf{RsyncShareName} = '/home/user';
$Conf{BackupFilesExclude} = ['/.*','*.mp3'];

or will this fail?

thanks

ciccio

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post couple of questions 
On 06/17 10:09 , ciccio whydoineedalastnameyoufuckinghotmail wrote:
$Conf{BackupFilesExclude} = ['/.*','*.mp3'];

A quick demonstration with 'ls' will show that the '/.*' construct is
something to be avoided. Smile

$ ls /.*
/.:
bin boot cdrom dev etc floppy home initrd lib lost+found mnt proc
root sbin tftpboot tmp usr var

/..:
bin boot cdrom dev etc floppy home initrd lib lost+found mnt proc
root sbin tftpboot tmp usr var


in your case, even if you set the working root to /home/username; the '/.*'
regex would (should?) cause the application to go up one directory level
(because .* includes '..') and exclude the directory which you are in.

It usually only takes one thoughtless 'rm -rf .*' before you learn a very
painful lesson. (and why backups are a good thing!).

If you want to catch all the dotfiles in your regex; the ways to do it are:
- .??* <--which will miss anything like '.a', unfortunately
- /path/to/dir/.* <--which means you need to specify a path above the
directory... not always possible.
- .[A-Z,a-z]* <--should work most of the time, provided there are no funky
characters starting the name

there's probably something better, which I can't think of right now. Anyone
else?


--
Carl Soderstrom
Systems Administrator
Real-Time Enterprises
www.real-time.com


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post couple of questions 
From: Carl Wilhelm Soderstrom <chrome < at > real-time.com>
If you want to catch all the dotfiles in your regex; the ways to do it are:
- .??* <--which will miss anything like '.a', unfortunately
- /path/to/dir/.* <--which means you need to specify a path above the
directory... not always possible.
- .[A-Z,a-z]* <--should work most of the time, provided there are no funky
characters starting the name

none of the above work, only the last one works with files. all the .blabla
directories are still backed up.

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post couple of questions 
thanks Mr Wilhelm you brought me up to this idea which works
for directories ie */.* if you put this in your regexpr then no hidden
directories will be backuped whereever they are
for files ie .*
works like a charm

greets
klaas

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post couple of questions 
On 06/17 04:10 , ciccio whydoineedalastnameyoufuckinghotmail wrote:
thanks Mr Wilhelm you brought me up to this idea which works
for directories ie */.* if you put this in your regexpr then no hidden
directories will be backuped whereever they are
for files ie .*
works like a charm

ah, there you go.
I know I've used that in the past, with other backup systems; just didn't
think of it right away this morning.

--
Carl Soderstrom
Systems Administrator
Real-Time Enterprises
www.real-time.com


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post couple of questions 
Carl Wilhelm Soderstrom writes:

On 06/17 10:09 , ciccio whydoineedalastnameyoufuckinghotmail wrote:
$Conf{BackupFilesExclude} = ['/.*','*.mp3'];

A quick demonstration with 'ls' will show that the '/.*' construct is
something to be avoided. Smile

$ ls /.*
/.:
bin boot cdrom dev etc floppy home initrd lib lost+found mnt proc
root sbin tftpboot tmp usr var

/..:
bin boot cdrom dev etc floppy home initrd lib lost+found mnt proc
root sbin tftpboot tmp usr var

Yes, but rsync specifically removes the "." and ".." directories
when it traverses the directory tree, so they never match. Here's
the code from flist.c:

if (dname[0] == '.' && (dname[1] == '\0'
|| (dname[1] == '.' && dname[2] == '\0')))
continue;

Therefore, I believe (without testing), that "/.*" should exclude
all top-level directories and files that start with "."
(eg: /home/user/.*, but not /home/user/..).

And something like ".*/" should exclude just directories (not files)
at all levels, including the top level.

Craig


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post couple of questions 
On 06/17 01:36 , Craig Barratt wrote:
Yes, but rsync specifically removes the "." and ".." directories
when it traverses the directory tree, so they never match.

huh. cool.
Pretty damn nifty software. Learn amazing new things about it all the time.
Smile

--
Carl Soderstrom
Systems Administrator
Real-Time Enterprises
www.real-time.com


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

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