I second what Michael wrote.  My only change would be to not use the '*' or
replace it with a "."  In that way any hidden files ( i.e. file
beginning with a dot ) will be included in the rsync.  That is, it would
look like this:

rsync -av /media/bkup1/ /mnt/usb1tb


or this:

rsync -av /media/bkup1/. /mnt/usb1tb


or even this:

rsync -av /media/bkup1/./ /mnt/usb1tb


My preference is that last version as it is very explicit that you want all
the files in the source folder.

Regards,
- Robert

On Wed, Jan 10, 2024 at 12:45 PM Michael Ewan <[email protected]>
wrote:

> In my experience cp(1) is fragile, which is why I use rsync(1) for anything
> more than one or two files.
> The following should work,
>
> rsync -av /media/bkup1/* /mnt/usb1tb
>
> This will create all the subdirectories from /media/bkup1 and copy all the
> files onto the mounted USB drive.
> Rsync is re-entrant, i.e. it will start where it left off if something
> happens.  If you want to copy each directory separately, change the * to
> the name of the directory.
>
>
>
> On Wed, Jan 10, 2024 at 11:16 AM Rich Shepard <[email protected]>
> wrote:
>
> > In my MediaSonic Probox the backup1 drive is still formatted with xfs.
> > Since
> > XFS throws an error now and then requiring me to umount the drive, run
> > xfs_repair, and remount it I want to replace the filesystem with ext4.
> >
> > Currently, the drive holds 644GB. When I've tried to `cp -R /media/bkup1'
> > to
> > a 1TB USB flash drive it's taken hours and fails when the cp command hits
> > the spot(s) causing the errors.
> >
> > One approach I could use is to copy each of the 8 subdirectories one at a
> > time. Is there a better way to copy off the files so I can replace the
> > filesystem and re-copy the files back to it?
> >
> > TIA,
> >
> > Rich
> >
> >
>

Reply via email to