On Sat, 25 Jan 2020 13:02:49 -0800
John Jason Jordan <[email protected]> dijo:

>On Sat, 25 Jan 2020 10:51:26 -0800
>Ben Koenig <[email protected]> dijo:
>>Try sticking to -rvh

>Having run the command and looked at the properties for each folder
>with a GUI file manager I knew that some files had not been copied. To
>get a list I used 'diff -qr /home /media/jjj/Data/Home/ |more,' but I'm
>having trouble figuring out what it's saying. It looks like there are
>lots of files in the backup that are not in ~/, like the --delete
>option in the command is not working. I have since run the rsync
>command numerous times, always making minor changes to ~/, and each
>time the backup folder keeps getting bigger. And about half the files
>that were not copied were 'permission denied,' but I'm still scratching
>my head abut the rest.

I still don't have things working quite right. And note that what I want
is a mirror, and the purpose is just to be able to restore an
individual file or folder that I accidentally deleted; the purpose is
not to make a disk copy for a bare metal restore. Here is the command I
am using:

        $ rsync -rvh --delete /home/jjj/ /media/jjj/Data/Home/

I ran it just now, and it took only about ten seconds. But note that
previously I had run the command with -avx instead of rvh. As it ran I
saw the output in the terminal window, and it started by deleting a
couple dozen files, as expected, since I had deleted some files from ~/
since I last ran the command. The deletions were followed by a couple
dozen additions, and then it ended. Afterwards I used PCFileManFM (my
preferred GUI file manager) to right click and select Properties
for /home and /media.jjj/Data/Home. This time the results were very
close:

/home   709,598 files, total 355,978,757,994 bytes
/media/jjj/Data/Home    709,561 files, 355,977,902,523 bytes

So now the backup has three more files than the source. But that doesn't
add up. If files were not on the source, why weren't they deleted from
the backup?

Furthermore, there are half a dozen files/folders in the root of /home
that are owned by root, like gvfs-burn, etc., so the total in the
backup should be even a bit fewer. Plus, when I first ran the command I
saw quite a few 'permission denied' messages zooming by in the terminal
window. The backup ought to have maybe as many as a hundred fewer
files.

After running the command I used diff:

$ diff -qr /home /media/jjj/Data/Home/ |grep /media/jjj/Data/Home

And, as before, the results were completely confusing. I got pages and
pages of 'only in /media/jjj/Home.' Yet, randomly selecting a few, they
are all in ~/. Clearly my diff command needs work.

What would happen if I ran the rsync command with sudo? Would it make
the entire backup be owned by root, or would the command still preserve
existing ownerships?
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to