Author Topic: Rsync  (Read 1399 times)

0 Members and 1 Guest are viewing this topic.

Offline freelancehelp

  • Jr. Member
  • **
  • Posts: 52
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Rsync
« on: May 27, 2021, 07:45:47 pm »
 Rsync has been regularly used to backup files in the home directory on a Linux desktop to a FAT32 USB stick.

Recently rsync has stalled due to problems with Service Worker and Local Storage files being transferred from
the home directory to the stick.

These files were deleted and rsync then rerun.

Rsync then stalled and produced many error messages of the form :-

rsync: chgrp
<file> failed:
Operation not permitted (1)

where <file> represents a filename.

The rsync command is of the form :-

rsync -v -a  --max-size=4GB --delete <home directory> .
<mount point> .

where <home directory> represents the home directory and <mount point> represents
the mount point.

I realise that FAT32 knows nothing about permissions, etc.,
but the above command has worked successfully on previous occasions.

Why are the above error messages appearing ?

Do they have anything to do with the Service Worker and Local Storage files which had been created on the
USB stick in the previous run of rsync ?

What is the best thing to do to get rsync working okay again ?

N.B. I don't want to change the rsync command in any way.

Would it be okay to delete all the files currently on the stick and then rerun rsync ?

Offline Brian000

  • Jr. Member
  • **
  • Posts: 19
  • Karma: 1
    • View Profile
    • Awards
Re: Rsync
« Reply #1 on: June 06, 2021, 11:38:50 pm »
Hi,

I wonder if you have any large files in your home directories and if you're exceeding the available space or your defined RSYNC limit or just the limitations of FAT32 (different file types have difference specifications/limitations).  As you say the RSYNC command looks OK and I can run it on Debian10 to a VFAT USB (but I have almost nothing in my HOME, so that's far from a comparable test)

Can you confirm you HOME partition and file type - "df -Th ~"  and also check if there are any files larger than or close to 4gb (being the limit for FAT32)

If you have a spare USB, I'd format it to whatever your HOME is, which should reduce those incompatibility risks.

Is that possible? - let me know the results....

Regards deleting; if it's solely a backup for you "home" and you intend to recreate it anyway - then that sounds fine (BUT, since I don't know your requirements/intentions, I'll strongly recommend you copy that data and ensure its safe first before doing anything that may risk your data).

...but on paper using RSYNC to copy to an USB drive, that should be fine.....
 

The Linux Community Forum

Re: Rsync
« Reply #1 on: June 06, 2021, 11:38:50 pm »

Offline Keith

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1493
  • Karma: 20
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Rsync
« Reply #2 on: June 07, 2021, 03:11:13 pm »
Freelance, 

you give your command as:
Quote
rsync -v -a  --max-size=4GB --delete <home directory> .
<mount point> .
I note three points:
1. you have two lines here - is that how you issue the command?
2. You show two full stops (.).  They have a particular meaning in Linux (it means your current directory) so the first line would copy your Home directory (if that's where you are) to the home directory. 
I am guessing that your actual command is
Code: [Select]
rsync -v -a  --max-size=4GB --delete <home directory> <mount point>
Is that the case?

3. Do you really want to back up the whole of your Home directory?  Including all the system files?  Mine comes to 64GB.  If you do, you might be better off using the tar command which saves the whole lot as a single file which can be compressed, too.  Its rather fiddly to use which is why I use rsync but I back up only the important directories (Documents, Pictures, etc) and you can put them all on the same line like so:
Code: [Select]
rsync -av --delete --max-size=4GB Documents Pictures Music .bin etc  <mount-point>
Keith
« Last Edit: June 10, 2021, 02:59:44 pm by Keith »

Offline freelancehelp

  • Jr. Member
  • **
  • Posts: 52
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Rsync
« Reply #3 on: August 20, 2021, 03:35:22 pm »
Thanks very much for your replies.

My answers to your questions, Keith :-

(1) The rsync command is entered on the computer as a single line
(2) Both full stops are intentionally part of the command
(3) The whole of the home directory is required to be backed up.

I am now suggesting a different procedure to try and overcome the rsync hang :-

Rsync has very recently been run okay on a new FAT32 stick, using the command i previously reported
(the -a option is retained).

(a) I propose to put all the files on the current new stick
into a new directory (using mv *.* backup-dir) outside of my
home directory and then run rsync again on the stick.


Presumably the new run of rsync would delete backup-dir
(as this doesn't exist in my home directory) and then just
copy over all the home directory files again to the stick.


Would rsync run okay on the same stick using step (a) on a periodic basis ?

Offline Keith

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1493
  • Karma: 20
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Rsync
« Reply #4 on: August 20, 2021, 06:46:52 pm »
Hi Freelance.

I am confident that the use of full stops as shown in your previous post won't work, but as you are proposing a new method I'll address that.

Quote
I propose to put all the files on the current new stick
into a new directory (using mv *.* backup-dir) outside of my
home directory and then run rsync again on the stick.
The mv command will delete the files from the source (while transferring them to the destination).  You need to use the cp or rsync command. 
You don't need cp *.*    -    cp * will do. 
Quote
Presumably the new run of rsync would delete backup-dir
(as this doesn't exist in my home directory) and then just
copy over all the home directory files again to the stick.
No: When you backup a complete directory, rsync will remove from the backed-up directory any files that have been deleted from the corresponding source directory (hence the sync).  "backup-dir" will remain on the USB stick.

Quote
Would rsync run okay on the same stick using step (a) on a periodic basis ?
Yes, if you use rsync.

Keith
« Last Edit: August 20, 2021, 06:48:43 pm by Keith »

The Linux Community Forum

Re: Rsync
« Reply #4 on: August 20, 2021, 06:46:52 pm »

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1497
  • Karma: 10024
  • Gender: Male
    • View Profile
    • Awards
Re: Rsync
« Reply #5 on: September 02, 2021, 01:48:17 pm »
Hi,
Just a couple of comments on pattern matching, as Keith pointed out, although Windows pattern matching "looks" like Linux/bash pattern matching, there are some subtle differences. If you try the following;
Code: [Select]
echo *
echo .*
echo *.*
  • You will see that "*" matches all files (that do NOT begin with '.')
  • ".*" will match all files that DO begin with "."
  • And "*.*" will match all files that contain a "." (but do not begin with a dot)
:)

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal