Re: Questions with rsync
This is a very useful thread for me to follow. You asked some interesting questions that led to answers with complete rsync scripts provided. That's what I call a really great response! It does help if you read `man rsync` and the web resources carefully. They can answer a lot of questions. You may want to read a copy of the book "Backup and Recovery" by W. Curtis Preston. It was published by O'Reilly in 2007 and might even feature current technologies...and it is available from Amazon. Preston wrote an earlier book with almost the same title, whuch is out of print. That one is "Unix Backup and Recovery" and I have it here. http://www.backupcentral.com/ Bob On 06/13/2009 10:22 PM, gmspro wrote: --- On Sat, 6/6/09, Mail Lists wrote: From: Mail Lists Subject: Re: Questions with rsync To: "Community assistance, encouragement, and advice for using Fedora." Cc: "GMS S" Date: Saturday, June 6, 2009, 6:18 AM On 06/04/2009 06:28 AM, Steven Stern wrote: On 06/04/2009 12:53 AM, GMS S wrote: mv backup.8 backup.9 mv backup.7 backup.8 mv backup.6 backup.7 Have you tried rdiff-backup ? It will do all this for you ... and its as easy to use as rsync alone. Do rsync and rdiff-backup have the option of compression. I think they just copy the files. Is it possible to backup 20GB partition into 8GB or below 8GB using rsync or rdiff-backup? -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On 06/14/2009 02:19 PM, Patrick O'Callaghan wrote: > Why don't you try reading the manual? Most of the questions you're > asking here are clearly documented if you only take the trouble to > check. Sure, some stuff is not adequately documented and some docs may > even have errors, but asking if rsync does compression is so basic that > I have to wonder if you're making even a minimal effort to find things > out for yourself before blasting off another question and expecting > someone else to do the work for you. > > poc > It is clear to me that answering anything at all for that individual is a total waste. Save your energy where it will count. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Sat, 2009-06-13 at 19:22 -0700, gmspro wrote: > --- On Sat, 6/6/09, Mail Lists wrote: > > > From: Mail Lists > > Subject: Re: Questions with rsync > > To: "Community assistance, encouragement, and advice for using Fedora." > > > > Cc: "GMS S" > > Date: Saturday, June 6, 2009, 6:18 AM > > On 06/04/2009 06:28 AM, Steven Stern > > wrote: > > > On 06/04/2009 12:53 AM, GMS S wrote: > > >> mv backup.8 backup.9 > > >> mv backup.7 backup.8 > > >> mv backup.6 backup.7 > > > > > > Have you tried rdiff-backup ? It will do all this > > for you ... and its > > as easy to use as rsync alone. > > Do rsync and rdiff-backup have the option of compression. > I think they just copy the files. > Is it possible to backup 20GB partition into 8GB or below 8GB using rsync or > rdiff-backup? Why don't you try reading the manual? Most of the questions you're asking here are clearly documented if you only take the trouble to check. Sure, some stuff is not adequately documented and some docs may even have errors, but asking if rsync does compression is so basic that I have to wonder if you're making even a minimal effort to find things out for yourself before blasting off another question and expecting someone else to do the work for you. poc -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
--- On Sat, 6/6/09, Mail Lists wrote: > From: Mail Lists > Subject: Re: Questions with rsync > To: "Community assistance, encouragement, and advice for using Fedora." > > Cc: "GMS S" > Date: Saturday, June 6, 2009, 6:18 AM > On 06/04/2009 06:28 AM, Steven Stern > wrote: > > On 06/04/2009 12:53 AM, GMS S wrote: > >> mv backup.8 backup.9 > >> mv backup.7 backup.8 > >> mv backup.6 backup.7 > > > Have you tried rdiff-backup ? It will do all this > for you ... and its > as easy to use as rsync alone. Do rsync and rdiff-backup have the option of compression. I think they just copy the files. Is it possible to backup 20GB partition into 8GB or below 8GB using rsync or rdiff-backup? -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
--- On Sat, 6/13/09, Sharpe, Sam J wrote: > >> > #! /bin/sh > > >> > /dev > >> > /home/*/.gvfs/ > >> > /home/*/.google/ > >> > /home/*/.dbus/ > >> > /home/*/.fonts/ > > > > There are no files like > > > > /home/*/.gvfs/ > > /home/*/.google/ > > /home/*/.dbus/ > > /home/*/.fonts/ > > > > Can I avoid these lines? > > Yes. > > > And I have some confusions too. > > /home/* means everything in the /home directory. > > So what does it mean by /home/*/.gvfs? > > * expands to everything in the directory, so if you have: > > /home/user1 > /home/user2 > /home/user3 > > That expands to /home/user1/.gvfs/ /home/user2/.gvfs/ > /home/user3/.gvfs/ > > To put it in English, it means "the .gvfs folders within > every > subdirectory of /home/" I got the .gvfs directory. ls -al shows this directory in /home/user. Can you tell why "ls -la | grep .gvfs" does not show any result? > > -- > Sam Thanks. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
2009/6/13 gmspro : > > --- On Thu, 6/4/09, Steven Stern wrote >> > #! /bin/sh >> > /dev >> > /home/*/.gvfs/ >> > /home/*/.google/ >> > /home/*/.dbus/ >> > /home/*/.fonts/ > > There are no files like > > /home/*/.gvfs/ > /home/*/.google/ > /home/*/.dbus/ > /home/*/.fonts/ > > Can I avoid these lines? Yes. > And I have some confusions too. > /home/* means everything in the /home directory. > So what does it mean by /home/*/.gvfs? * expands to everything in the directory, so if you have: /home/user1 /home/user2 /home/user3 That expands to /home/user1/.gvfs/ /home/user2/.gvfs/ /home/user3/.gvfs/ To put it in English, it means "the .gvfs folders within every subdirectory of /home/" -- Sam -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
--- On Thu, 6/4/09, Steven Stern wrote > > #! /bin/sh > > cd /media/MyBookLX/sds-desk > > rm -fr backup.9 > > mv backup.8 backup.9 > > mv backup.7 backup.8 > > mv backup.6 backup.7 > > mv backup.5 backup.6 > > mv backup.4 backup.5 > > mv backup.3 backup.4 > > mv backup.2 backup.3 > > mv backup.1 backup.2 > > cp -al backup backup.1 > > > > touch /last_backup_ts > > rsync -va --exclude-from > /usr/local/bin/do-backup-excludes --delete / > > /media/MyBookLX/sds-desk/backup/ > > > > The exclude list is > > > > /proc > > /tmp > > /var/tmp > > /media > > /sys > > /dev > > /home/*/.gvfs/ > > /home/*/.google/ > > /home/*/.dbus/ > > /home/*/.fonts/ There are no files like /home/*/.gvfs/ /home/*/.google/ /home/*/.dbus/ /home/*/.fonts/ Can I avoid these lines? And I have some confusions too. /home/* means everything in the /home directory. So what does it mean by /home/*/.gvfs? Thank you for your reply. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On 06/04/2009 06:28 AM, Steven Stern wrote: > On 06/04/2009 12:53 AM, GMS S wrote: >> mv backup.8 backup.9 >> mv backup.7 backup.8 >> mv backup.6 backup.7 Have you tried rdiff-backup ? It will do all this for you ... and its as easy to use as rsync alone. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/04/2009 12:53 AM, GMS S wrote: > [ > Here's my full-system rsync backup script. It goes to an external USB drive. > > #! /bin/sh > cd /media/MyBookLX/sds-desk > rm -fr backup.9 > mv backup.8 backup.9 > mv backup.7 backup.8 > mv backup.6 backup.7 > mv backup.5 backup.6 > mv backup.4 backup.5 > mv backup.3 backup.4 > mv backup.2 backup.3 > mv backup.1 backup.2 > cp -al backup backup.1 > > touch /last_backup_ts > rsync -va --exclude-from /usr/local/bin/do-backup-excludes --delete / > /media/MyBookLX/sds-desk/backup/ > > The exclude list is > > /home/*/.gvfs/ > /home/*/.google/ > /home/*/.dbus/ > /home/*/.fonts/ > /proc > /tmp > /var/tmp > /media > /sys > /dev > > - -- > > Steve > ] > > There are so many backup.1,backup.2,backup.3 ... files.Why? > How did these files come? > Did you create these 9 files in the external USB? > > > > The beginning of the script rolls the last backup to backup1, the one before that to backup2, etc. This way, I keep 10 backup sets on the USB drive. They don't use much space, because "cp -al" uses hard links to do the copies. Therefore, a file that's in all backup sets takes up only the space necessary to store it once. This ties nicely with how rsync does a delete. When a file gets deleted from the new backup set (or replaced with an updated copy), the old versions are not affected. This guy explains it a lot better. It's where I got the script from. http://www.mikerubel.org/computers/rsync_snapshots/ - -- Steve -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkonodcACgkQeERILVgMyvC69gCeKWLC+9ytaNKQxT16OESOpck5 xncAnjfBFUlE55H3uHNrBSMaXia6tOO4 =IUs1 -END PGP SIGNATURE- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
[ Here's my full-system rsync backup script. It goes to an external USB drive. #! /bin/sh cd /media/MyBookLX/sds-desk rm -fr backup.9 mv backup.8 backup.9 mv backup.7 backup.8 mv backup.6 backup.7 mv backup.5 backup.6 mv backup.4 backup.5 mv backup.3 backup.4 mv backup.2 backup.3 mv backup.1 backup.2 cp -al backup backup.1 touch /last_backup_ts rsync -va --exclude-from /usr/local/bin/do-backup-excludes --delete / /media/MyBookLX/sds-desk/backup/ The exclude list is /home/*/.gvfs/ /home/*/.google/ /home/*/.dbus/ /home/*/.fonts/ /proc /tmp /var/tmp /media /sys /dev - -- Steve ] There are so many backup.1,backup.2,backup.3 ... files.Why? How did these files come? Did you create these 9 files in the external USB? -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
Thank guys for your reply. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Wed, 2009-06-03 at 19:02 -0700, Gordon Messmer wrote: > On 06/03/2009 06:05 PM, Patrick O'Callaghan wrote: > > On Wed, 2009-06-03 at 10:05 -0430, Patrick O'Callaghan wrote: > >> On Wed, 2009-06-03 at 03:02 -0700, GMS S wrote: > >>> Will this command do the job for backup? > >>> > >>> rsync -vpa / /home/user/backup > >> Er, isn't this recursive? > > > > What I meant to say was "isn't this an infinite loop?" The entire > > filesystem rooted at / is being copied into one of its subtrees. > > > > The answer is that rsync is clever enough to avoid this (I tried it on a > > test directory), > > Try it a second time. > > rsync ain't that smart. The only reason it worked the first time is > that rsync built a list of files/directories to copy before it copied > them. With rsync 3, it only builds that list for one directory at a > time. Older versions built the entire list before beginning. You'll > get different results with the two versions, IIRC. Make sense. Even more reason to avoid the above incantation and use a standard package. poc -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On 06/03/2009 06:05 PM, Patrick O'Callaghan wrote: On Wed, 2009-06-03 at 10:05 -0430, Patrick O'Callaghan wrote: On Wed, 2009-06-03 at 03:02 -0700, GMS S wrote: Will this command do the job for backup? rsync -vpa / /home/user/backup Er, isn't this recursive? What I meant to say was "isn't this an infinite loop?" The entire filesystem rooted at / is being copied into one of its subtrees. The answer is that rsync is clever enough to avoid this (I tried it on a test directory), Try it a second time. rsync ain't that smart. The only reason it worked the first time is that rsync built a list of files/directories to copy before it copied them. With rsync 3, it only builds that list for one directory at a time. Older versions built the entire list before beginning. You'll get different results with the two versions, IIRC. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Wed, 2009-06-03 at 10:05 -0430, Patrick O'Callaghan wrote: > On Wed, 2009-06-03 at 03:02 -0700, GMS S wrote: > > Will this command do the job for backup? > > > > rsync -vpa / /home/user/backup > > Er, isn't this recursive? What I meant to say was "isn't this an infinite loop?" The entire filesystem rooted at / is being copied into one of its subtrees. The answer is that rsync is clever enough to avoid this (I tried it on a test directory), but I'm not sure if I'd like to rely on this behaviour as it doesn't appear to be documented. My personal preference is rsnapshot, which does everything people have been claiming for their own personal rsync scripts (it also uses rsync of course), but is actually maintained in the standard repos. poc -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/03/2009 05:02 AM, GMS S wrote: > Will this command do the job for backup? > > rsync -vpa / /home/user/backup > > How would I exclude these files below: > > /lost+found > /media > /mnt > > and others which I do not need. > > And what is the compression lever by rsync (using -a option)? > > > > Here's my full-system rsync backup script. It goes to an external USB drive. #! /bin/sh cd /media/MyBookLX/sds-desk rm -fr backup.9 mv backup.8 backup.9 mv backup.7 backup.8 mv backup.6 backup.7 mv backup.5 backup.6 mv backup.4 backup.5 mv backup.3 backup.4 mv backup.2 backup.3 mv backup.1 backup.2 cp -al backup backup.1 touch /last_backup_ts rsync -va --exclude-from /usr/local/bin/do-backup-excludes --delete / /media/MyBookLX/sds-desk/backup/ The exclude list is /home/*/.gvfs/ /home/*/.google/ /home/*/.dbus/ /home/*/.fonts/ /proc /tmp /var/tmp /media /sys /dev - -- Steve -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkonEYIACgkQeERILVgMyvCQqQCfV/WADSIZrSdAgMeXxqjYsr6/ xuQAn23AzsdFxsMPEnnLHtEobCuxfuLx =WJx/ -END PGP SIGNATURE- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On 06/03/2009 06:13 PM, Cameron Simpson wrote: > On 03Jun2009 11:00, Rick Stevens wrote: >> GMS S wrote: > I use an extra level of complexity on top of this approach: I hard link > the previous backup directory to the new date, then rsync to the new A simpler (and far superior) way is to use rdiff-backup - it keeps a top level total backup - and incrementals going back as far as you want. I am running backups every 2 hours - and will reduce to hourly. It takes a while the first time like basic rsync - and it uses rsync library (ie same technology as rsync). Strongly recommended. gene -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On 03Jun2009 11:00, Rick Stevens wrote: > GMS S wrote: > I use this sort of thing with a 500GB USB drive (automounted at > "/media/500GB-Drive" by Gnome): > > #!/bin/bash > # Back up system to a specific directory given on the command > # line or a default based on today's date. Excludes the /proc, > # /sys, /dev and /media directories > MYHOST=`hostname` > TODAY=`date +%d-%b-%Y` > if [ $# -lt 1 ]; then > TGT="/media/500GB-Drive/$MYHOST-BackUp-$TODAY" > else > TGT=$1 > fi > > rsync -avXA --exclude-from=/etc/skipdirs.rsync / $TGT > > with /etc/skipdirs.rsync containing: [...] I use an extra level of complexity on top of this approach: I hard link the previous backup directory to the new date, then rsync to the new date. This makes the cost-per-backup just the incremental cost of changed files; unchanged files are thus hardlinked from the previous backup. Code here: http://www.cskk.ezoshosting.com/cs/css/bin/histbackup Then: mkdir -p /media/500GB-Drive/backups histbackup -x / /media/500GB-Drive/backups -X Histbackup automatically honours a .hbinclude file in the backup area as an '--include-from' option, so you'd set up /media/500GB-Drive/backups/.hbinclude as required. There's a bunch of similar rsync-based backup scripts on the web for this purpose. Cheers, -- Cameron Simpson DoD#743 http://www.cskk.ezoshosting.com/cs/ There's a fine line between cleverness and stupidity. - Nigel Tufnel, _Spinal Tap_ -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
GMS S wrote: [ I would pretty much recommend that you specifically omit /dev and /proc too. Save the filter to a text file and make it look something like this (I like the first one but you might not). + and - symbols should be obvious. - ~* - /lost+found/ + **/home/user/backup rsync -vpa --filter='. /path/to/rsync-filter' $source $destination I didn't think '-a' option indicates compression at all, only 'archive' and you might want '-u' option for update. Craig ] So what would be the final command if I exclude these directory? /lost+found /media /mnt /dev /proc /home/user/backup /dev I use this sort of thing with a 500GB USB drive (automounted at "/media/500GB-Drive" by Gnome): #!/bin/bash # Back up system to a specific directory given on the command # line or a default based on today's date. Excludes the /proc, # /sys, /dev and /media directories MYHOST=`hostname` TODAY=`date +%d-%b-%Y` if [ $# -lt 1 ]; then TGT="/media/500GB-Drive/$MYHOST-BackUp-$TODAY" else TGT=$1 fi rsync -avXA --exclude-from=/etc/skipdirs.rsync / $TGT with /etc/skipdirs.rsync containing: /proc/* /sys/* /dev/* /media/* Tweak as you see fit. -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - To err is human, to moo bovine. - -- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
GMS S writes: > Will this command do the job for backup? > > rsync -vpa / /home/user/backup > > How would I exclude these files below: > > /lost+found > /media > /mnt It is always a good idea to throw in an "-x" to these programs and then list the filesystems you want to backup explicitly. -wolfgang -- Wolfgang S. Rupprecht Android 1.5 (Cupcake) and Fedora-11 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Wednesday 03 June 2009 08:35:50 Patrick O'Callaghan wrote: > On Wed, 2009-06-03 at 03:02 -0700, GMS S wrote: > > Will this command do the job for backup? > > > > rsync -vpa / /home/user/backup > > Er, isn't this recursive? > > poc I didn't really like the behavior of the filter functionality in rsync so I took a different approach. I have a file called dirlist which is the list of root level directories I want to backup, this is coupled with a shell script (rsync_backup.sh) which runs my desired rsync command for each dirname found in the dirlist file. I also have a restore shell script (rsync_restore.sh). I use this to backup my Fedora10 laptop before I run any updates. I have had to go back and run the restore when updates caused video issues, the restore worked flawlessly. I've attached the dirlist and both rsync scripts (the backup and the restore), hope it's helpful. bin boot docs download etc home lib lib64 lost+found media mnt opt root sbin selinux srv tmp usr var rsync_backup.sh Description: application/shellscript rsync_restore.sh Description: application/shellscript -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Wed, 2009-06-03 at 03:02 -0700, GMS S wrote: > Will this command do the job for backup? > > rsync -vpa / /home/user/backup Er, isn't this recursive? poc -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On 6/3/09, GMS S wrote: > > Will this command do the job for backup? > > rsync -vpa / /home/user/backup > > How would I exclude these files below: > > /lost+found > /media > /mnt > > and others which I do not need. > > And what is the compression lever by rsync (using -a option)? Not an answer to your questions, but if you plan to use rsync for backup, have a look at this: http://www.mikerubel.org/computers/rsync_snapshots/ Andras -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
[ I would pretty much recommend that you specifically omit /dev and /proc too. Save the filter to a text file and make it look something like this (I like the first one but you might not). + and - symbols should be obvious. - ~* - /lost+found/ + **/home/user/backup rsync -vpa --filter='. /path/to/rsync-filter' $source $destination I didn't think '-a' option indicates compression at all, only 'archive' and you might want '-u' option for update. Craig ] So what would be the final command if I exclude these directory? /lost+found /media /mnt /dev /proc /home/user/backup /dev Thanks. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Wed, 2009-06-03 at 03:02 -0700, GMS S wrote: > Will this command do the job for backup? > > rsync -vpa / /home/user/backup > > How would I exclude these files below: > > /lost+found > /media > /mnt > > and others which I do not need. > > And what is the compression lever by rsync (using -a option)? I would pretty much recommend that you specifically omit /dev and /proc too. Save the filter to a text file and make it look something like this (I like the first one but you might not). + and - symbols should be obvious. - ~* - /lost+found/ + **/home/user/backup rsync -vpa --filter='. /path/to/rsync-filter' $source $destination I didn't think '-a' option indicates compression at all, only 'archive' and you might want '-u' option for update. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: Questions with rsync
On Wed, Jun 3, 2009 at 8:02 PM, GMS S wrote: > > Will this command do the job for backup? > > rsync -vpa / /home/user/backup > > How would I exclude these files below: > > /lost+found > /media > /mnt > if you man rsync , you can see two options for you: --exclude=PATTERN exclude files matching PATTERN --exclude-from=FILE read exclude patterns from FILE > and others which I do not need. > > And what is the compression lever by rsync (using -a option)? > > > > > -- > fedora-list mailing list > fedora-list@redhat.com > To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list > Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines > -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Questions with rsync
Will this command do the job for backup? rsync -vpa / /home/user/backup How would I exclude these files below: /lost+found /media /mnt and others which I do not need. And what is the compression lever by rsync (using -a option)? -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines