Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


How to backup with "rpi-clone"?
#13
(01-05-2019, 03:21 AM)kitamura_design Wrote:
(01-05-2019, 02:34 AM)Tim Curtis Wrote: Hi Kent,

It does live imaging or some sort of equavalent process?

I'll have to check it out :-)

Hi Tim,

Next, I tried the 'force initialized option (-f, and -f2)'.
Quote:pi@moode:~ $ sudo rpi-clone
No destination disk given.

usage: rpi-clone sdN {-v|--verbose} {-f|--force-initialize} {-f2}
         {-u|--unattended} {-U|--Unattended} {-q|--quiet}
         {-s|--setup host} {-e|--edit-fstab sdX } {-m|--mountdir dir }
         {-L|--label-partitions label} {-l|--leave-sd-usb-boot}
         {-a|--all-sync} {-F|--Force-sync} {-x} {-V|--version}
         {--convert-fstab-to-partuuid}

    -v    - verbose rsync, list all files as they are copied.
    -f    - force initialize the destination disk by imaging the booted disk
partition structure.  File systems are then synced or imaged.
    -f2    - force initialize only the first 2 partitions to the destination.
So a multi partition USB boot can initialize clone back to
a 2 partition SD card.
    -u    - unattended clone if not initializing.  No confirmations asked,
but abort if disk needs initializing or on error.
    -U      - unattended even if initializing. No confirmations asked,
                but abort only on errors.
    -q      - quiet mode, no output unless errors or initializing. Implies -u.
    -s host - add 'host' to args passed to script rpi-clone-setup and run it
                after cloning but before unmounting partitions. For setting
clone disk hostname, but args can be what the script expects.
                You can give multiple -s arg options.
    -e sdX  - edit destination fstab to change booted device names to new
             device 'sdX'.  This is Only for fstabs that use device names.
                Used for setting up a USB bootable disk.
    -m dir  - Add dir to a custom list of mounted directories to sync.  Then
                the custom list will be synced instead of the default of all
                mounted directories.  The root directory is always synced.
                Not for when initializing.
    -L lbl  - label for ext type partitions.  If ends with '#', replace with
                partition number and label all ext partitions. Otherwise,
                apply label to root partition only.
    -l      - leave SD card to USB boot alone when cloning to SD card mmcblk0
                from a USB boot.  This preserves a SD card to USB boot setup
                by leaving the SD card cmdline.txt using the USB root. When
                cloning to USB from SD card this option sets up the SD card
                cmdline.txt to boot to the USB disk.
    -a      - Sync all partitions if types compatible, not just mounted ones.
    -F      - force file system sync even if errors.
                If source used > destination space error, do the sync anyway.
If a source partition mount error, skip it and do other syncs.
    -x      - use set -x for very verbose bash shell script debugging
    -V      - print rpi-clone version.
.. and shows error massage like as below;

Code:
Syncing file systems (can take a long time)
Syncing mounted partitions:
 Mounting /dev/mmcblk0p2 on /mnt/clone
 => rsync // /mnt/clone with-root-excludes ...rsync: readlink_stat("/mnt/clone/debootstrap") failed: Structure needs cleaning (117)
IO error encountered -- skipping file deletion
rsync: recv_generator: failed to stat "/mnt/clone/bin/bzip2": Structure needs cleaning (117)
rsync: recv_generator: mkdir "/mnt/clone/debootstrap" failed: Structure needs cleaning (117)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: failed to stat "/mnt/clone/etc/memcached.conf": Structure needs cleaning (117)
rsync: recv_generator: failed to stat "/mnt/clone/etc/minidlna.conf": Structure needs cleaning (117)
rsync: recv_generator: failed to stat "/mnt/clone/etc/minidlna.conf.dpkg-dist": Structure needs cleaning (117)
rsync: recv_generator: failed to stat "/mnt/clone/etc/mpd.conf": Structure needs cleaning (117)
rsync: recv_generator: failed to stat "/mnt/clone/etc/passwd": Structure needs cleaning (117)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/pps/clients/pps-ldisc.ko) failed: Read-only file system (30)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/pps/clients/pps-gpio.ko) failed: Read-only file system (30)
cannot delete non-empty directory: etc/alternatives/vi.1.gz/pps/clients
rsync: delete_file: rmdir(etc/alternatives/vi.1.gz/pps/clients) failed: Read-only file system (30)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/pps/pps_core.ko) failed: Read-only file system (30)
cannot delete non-empty directory: etc/alternatives/vi.1.gz/pps
rsync: delete_file: rmdir(etc/alternatives/vi.1.gz/pps) failed: Read-only file system (30)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/power/supply/ltc2941-battery-gauge.ko) failed: Read-only file system (30)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/power/supply/ds2760_battery.ko) failed: Read-only file system (30)
cannot delete non-empty directory: etc/alternatives/vi.1.gz/power/supply
rsync: delete_file: rmdir(etc/alternatives/vi.1.gz/power/supply) failed: Read-only file system (30)
cannot delete non-empty directory: etc/alternatives/vi.1.gz/power
rsync: delete_file: rmdir(etc/alternatives/vi.1.gz/power) failed: Read-only file system (30)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/pinctrl/pinctrl-mcp23s08.ko) failed: Read-only file system (30)
cannot delete non-empty directory: etc/alternatives/vi.1.gz/pinctrl
rsync: delete_file: rmdir(etc/alternatives/vi.1.gz/pinctrl) failed: Read-only file system (30)
rsync: delete_file: unlink(etc/alternatives/vi.1.gz/perf/raspberrypi_axi_monitor.ko) failed: Read-only file system (30)
cannot delete non-empty directory: etc/alternatives/vi.1.gz/perf
.....

kitamura

I'd post the issue on the rpi-clone Git and mention that you are using a squashed file system for /var/www. The error messages though reference other directories which would suggest some other problem.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: How to backup with "rpi-clone"? - by Tim Curtis - 01-05-2019, 03:41 AM
RE: How to backup with "rpi-clone"? - by JST1963 - 01-05-2019, 03:18 AM

Forum Jump: