<div dir="ltr">by compress I thought they meant zip. so there is no way to zip it?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 23, 2015 at 1:36 PM, Brian Cluff <span dir="ltr"><<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The --compress-level=5 option is for compressing the data over a network. I would hope that rsync is smart enough to not actually compress the data internally when the data is staying local to the machine, but if it's not, telling it to compress will just eat up a bunch of your CPU to accomplish nothing.<br>
<br>
rsync does indeed have an exclude option that looks like:<br>
<br>
--exclude 'string*'<br>
<br>
If you want the data compressed but still want to use rsync on it, you will probably need to look into using a filesystem that will automatically compress your data. Then you can just use the same command to backup your data and the compression will be done transparently.<br>
<br>
Try looking into formatting your drive with something like the BTRFS filesystem that supports transparent compression.<br>
<br>
Brian Cluff<span class=""><br>
<br>
On 09/23/2015 06:49 AM, Michael Havens wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
It seems that the compress doesn't work.<br>
<br>
size of Documents folder:<br>
bmike1@c521 ~ $ du -hs Documents/<br>
which lists the size of 19G<br>
<br>
bmike1@c521 /media/bmike1/USB DISK $ du -hs ./<br>
20G./<br>
<br>
--compress-level=5 made it bigger!<br>
<br>
Or else do I also need to include '-z' as well?<br>
<br>
On Wed, Sep 23, 2015 at 9:29 AM, Michael Havens <<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a><br></span><span class="">
<mailto:<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>>> wrote:<br>
<br>
got it to backup. But still, please answer my question about the<br>
'exclude' option and how much I can compress it. I got it to backup<br>
by erasing the .Trash folder. Why don't pendrives make the space<br>
available after you delete a file?<br>
<br>
rsync -auWq --progress --delete --compress-level=5<br>
/home/bmike1/Documents /media/bmike1/"USB DISK"/<br>
rsync: rename "/media/bmike1/USB DISK/Documents/.forwardspamto<br>
.elhlC4" -> "Documents/forwardspamto ": Invalid argument (22)<br>
rsync: mkstemp "/media/bmike1/USB<br>
DISK/Documents/Business/Receipts/lazycash/.index.html?a_aid=509c458b25b79.sGaqe4"<br>
failed: Invalid argument (22)<br>
<br>
rsync: mkstemp "/media/bmike1/USB<br>
DISK/Documents/ComputerInstructions/.ForgotPassword?.xVeqCC" failed:<br>
Invalid argument (22)<br>
rsync: mkstemp "/media/bmike1/USB<br>
DISK/Documents/Education/.Screenshot-LFS101x.2 Progress | edX -<br>
Google Chrome.png.eyN1PK" failed: Invalid argument (22)<br>
rsync error: some files/attrs were not transferred (see previous<br>
errors) (code 23) at main.c(1183) [sender=3.1.0]<br>
<br>
<br>
On Wed, Sep 23, 2015 at 8:07 AM, Michael Havens <<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a><br></span><span class="">
<mailto:<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>>> wrote:<br>
<br>
I keep running out of space on the flash drive. How tightly can<br>
I compress it?<br>
Could I get it to not copy files like so: --exclude=string* so<br>
that it would exclude all files string<and whatever else comes<br>
after string><br>
????????????????????????<br>
<br>
On Mon, Sep 21, 2015 at 12:48 PM, Michael Havens<br></span><span class="">
<<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a> <mailto:<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>>> wrote:<br>
<br>
thanks!<br>
<br>
On Mon, Sep 21, 2015 at 12:40 PM, Brian Cluff<br></span><span class="">
<<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a> <mailto:<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a>>> wrote:<br>
<br>
Use --delete if you want the destination to have any<br>
files that have been deleted from the source to also<br>
deleted in the destination.<br>
<br>
The -q option just suppresses any output that isn't an<br>
error, I tend to leave it off do that I can see what<br>
file it's currently working on. You can add or remove<br>
it as needed.<br>
<br>
Brian Cluff<br>
<br>
On 09/21/2015 03:42 AM, Michael Havens wrote:<br>
<br>
what about the -q option and the --delete option? i<br>
noticed that you<br>
didn't use them in your command 'rsync -auW<br>
/sort/directory<br>
/dest/directory/'.<br>
<br>
On Sun, Sep 20, 2015 at 10:34 PM, Brian Cluff<br>
<<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a> <mailto:<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a>><br></span>
<mailto:<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a><div><div class="h5"><br>
<mailto:<a href="mailto:brian@snaptek.com" target="_blank">brian@snaptek.com</a>>>> wrote:<br>
<br>
If you are backing up locally you will want to<br>
do things a little<br>
different size as:<br>
<br>
rsync -auW /sort/directory /dest/directory/<br>
<br>
You will want to skip the -z option and the<br>
corresponding<br>
--compress-level option. Since you are doing<br>
copying everything<br>
locally that will only cause the machine to<br>
compress and immediately<br>
decompress every file that is copied wasting a<br>
ton of CPU/power.<br>
<br>
The other thing you will want to do is use the<br>
-W flag, that tells<br>
the machine to copy whole files instead of<br>
looking for what has<br>
changed between the documents. That way it can<br>
look at the time<br>
and/or size and if it's changed it will just<br>
copy the whole file.<br>
Without that flag it would read through both<br>
the source and<br>
destination file and then just copy the<br>
differences by writing a<br>
whole new file, so with the -W (whole file)<br>
flag the machine just<br>
reads/writes the file once and is a lot more<br>
efficient/faster.<br>
<br>
This can also be a good flag to set on fast<br>
networks since it can be<br>
a lot faster just to re-copy the whole file<br>
than it is to have the<br>
hard drive reading the file multiple times.<br>
<br>
The progress flag is very nice, but unless you<br>
are planning on<br>
closely monitoring your copy, I would skip it<br>
as I've found that it<br>
tends to slow down the transfer... or at least<br>
make it feel that<br>
way, like a watched pot never boils :)<br>
<br>
On your slash at end end question. A slash at<br>
the end tends to mean<br>
that you want to put the source files/dirs into<br>
that directory and a<br>
destination without a slash usually means that<br>
you want to rename<br>
your source file/directory to that destination<br>
file/dir name.<br>
<br>
Lastly the -h option gives you the sizes in<br>
easily readable terms or<br>
in other words, instead of just giving you the<br>
size in bytes it will<br>
give you size that look like 100K 2.4M 1.8G<br>
<br>
Brian Cluff<br>
<br>
<br>
On 09/20/2015 05:34 AM, Michael Havens wrote:<br>
<br>
I know how to use rsync (sorta) to backup a<br>
disk and go between<br>
remote<br>
machines. With my current incarnation of<br>
the os I'm not so<br>
worried about<br>
backing up the whole system as I am a<br>
directory (and all of the<br>
directories under it) nor copying between<br>
remote machines. The<br>
directory<br>
is the 'Documents' directory. Would I:<br>
<br>
rsync -aquz --compress-level=5<br>
/home/bmike1/Documents<br>
/media/bmike1/USB<br>
DISK/<br>
--<br>
:-)~MIKE~(-:<br>
<br>
<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list -<br>
<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a>><br></div></div>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><span class=""><br>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a>>><br>
To subscribe, unsubscribe, or to change<br>
your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list -<br>
<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a>><br></span>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><span class=""><br>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a>>><br>
To subscribe, unsubscribe, or to change your<br>
mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
<br>
<br>
<br>
--<br>
:-)~MIKE~(-:<br>
<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list -<br>
<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a>><br>
To subscribe, unsubscribe, or to change your mail<br>
settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list -<br>
<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
<mailto:<a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a>><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
<br>
<br>
<br>
--<br>
:-)~MIKE~(-:<br>
<br>
<br>
<br>
<br></span><span class="">
--<br>
:-)~MIKE~(-:<br>
<br>
<br>
<br>
<br>
--<br>
:-)~MIKE~(-:<br>
<br>
<br>
<br>
<br>
--<br>
:-)~MIKE~(-:<br>
<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8000001907349px">:-)~MIKE~(-:</span><br></div></div></div></div></div>
</div>