Cloning Booted RPi's microSD card on Windows PC through Network

Strange thing happened this morning. One of my RPis was supposed to have backed up at 01:00 but the backup didn’t happen and I found that the Raspberry wasn’t responding at all so I power cycled it.

I logged in and attempted to run a manual backup but it gave an error that it had encountered a problem stopping a service.

When I looked at the conf file, I discovered that there were extraneous entries in the services to stop and services to start entries. They were systemctl stop service.

I don’t know where they came from or when they appeared but when I removed them, the backup worked.

Might be something to watch out for.

Re https://discussions.flightaware.com/t/cloning-booted-rpis-microsd-card-on-windows-pc-through-network/66781/59?u=technodevotee
I eventually found a resolution to the slow transfer problem in WinSCP.
The answer is to disable the ‘optimise connection buffer size’ setting in the connection settings of the site.

1 Like

This thing has been fighting me tooth and nail. First problem: I use MX Linux 19.4 on my desktop PC (based on Debian Buster) and the PiAware image on my Pi. I shared the /home/jay/rpi-clone directory on my LAN with access set to “everyone” and chmod 777’d the directory for good measure. When I try to mount it in /mnt/backup (which directory I created) it prompts me for the password for root@192.168.1.xxx/rpi-clone (with “xxx” being the last octet of my desktop’s static IP address) even though I didn’t password-protect the share. When I enter either my root password or user password it then says “Unable to find suitable address.” and returns me to the shell prompt. I can ping my desktop PC from the Pi and I can access PiAware on it from the desktop, and also the Pi’s dump1090-fa output in VirtualRadarServer running on my desktop so the two devices are able to connect to each other over the LAN.

Next I formatted a 16GB USB stick as ext4 and mounted it in /mnt/backup on the Pi and tried doing a manual backup and I get this:

pi@piaware:~ $ sudo bash ./raspiBackup.sh -a : -o : -z -m detailed /mnt/backup
--- RBK0009I: piaware: raspiBackup.sh V0.6.6 (262862c) started at Sun 26 Sep 03:40:06 UTC 2021.
--- RBK0262I: Dynamic mount of /dev/sda1 skipped because it's already mounted.
--- RBK0128I: Using logfile /mnt/backup/piaware/piaware-rsync-backup-20210926-034004/raspiBackup.log.
--- RBK0116I: Using config file /usr/local/etc/raspiBackup.conf.
??? RBK0079E: Option -z not allowed with backuptype rsync.
--- RBK0091I: Invoke 'raspiBackup.sh -h' to get more detailed information of all script invocation parameters.
--- RBK0033I: Please wait until cleanup has finished.
/usr/local/bin/raspiBackup_mem_post.sh: line 34: getMemoryFree: command not found
--- RBK1001I: Memory usage - Pre backup - Used:  MB Free:  MB - Post backup - Used:  MB Free:  MB
/usr/local/bin/raspiBackup_temp_post.sh: line 34: getCPUTemp: command not found
--- RBK1000I: CPU temperature pre and post backup:  - 
/usr/local/bin/raspiBackup_disk_post.sh: line 34: getDiskUsage: command not found
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 2: syntax error
--- RBK1002I: Disk usage pre backup: Used: 0 Bytes Free: 0 Bytes
--- RBK1003I: Disk usage post backup: Used: 0 Bytes Free: 0 Bytes
/usr/local/bin/raspiBackup_disk_post.sh: line 74: ((: != 0 : syntax error: operand expected (error token is "!= 0 ")
--- RBK0043I: Removing incomplete backup in /mnt/backup/piaware/piaware-rsync-backup-20210926-034004. This may take some time. Please be patient.
--- RBK0049I: Messages saved in /home/pi/raspiBackup.msg.
--- RBK0026I: Debug logfile saved in /home/pi/raspiBackup.log.
--- RBK0010I: piaware: raspiBackup.sh V0.6.6 (262862c) stopped at Sun 26 Sep 03:40:10 UTC 2021 with rc 107.
??? RBK0005E: Backup failed. Check previous error messages for details.

Harumph!

FYI my raspiBackup.conf contents:

pi@piaware:/usr/local/etc $ sudo cat raspiBackup.conf
#####################################################
#
# Default configuration file for raspiBackup.sh
#
# (C) 2013,2020 framp at linux-tips-and-tricks dot de
#
# For more details about options visit
# http://www.linux-tips-and-tricks.de/de/raspibackup/#parameter
#
# $Date: 2021-08-06 10:10:06 +0200$
# $Sha1: f22c2e7$
#
#####################################################

# do not change following line
VERSION_CONFIG="0.1.5"

#####################################################
#
# Note:
#
# 0 turns an option off
# 1 turns an option on
#
#####################################################

# path to store the backupfile
DEFAULT_BACKUPPATH="/mnt/backup"

# type of backup: dd, tar or rsync
DEFAULT_BACKUPTYPE="rsync"

# zip tar or dd backup
DEFAULT_ZIP_BACKUP="0"

# dd backup will save space used by partitions only
DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=0

# how many backups to keep
DEFAULT_KEEPBACKUPS="3"
# how many backups to keep of the specific backup type. If zero DEFAULT_KEEPBACKUPS is used
DEFAULT_KEEPBACKUPS_DD=0
DEFAULT_KEEPBACKUPS_DDZ=0
DEFAULT_KEEPBACKUPS_TAR=0
DEFAULT_KEEPBACKUPS_TGZ=0
DEFAULT_KEEPBACKUPS_RSYNC=0

# Smart recycle
DEFAULT_SMART_RECYCLE="0"
# Smart recycle dryrun
DEFAULT_SMART_RECYCLE_DRYRUN="1"
# Smart recycle parameters (daily, weekly, monthly and yearly)
DEFAULT_SMART_RECYCLE_OPTIONS="7 4 12 1"

# commands to stop services before backup separated by &&
DEFAULT_STOPSERVICES=":"
# commands to start services after backup separated by &&
DEFAULT_STARTSERVICES=":"

# commands to execute before services are stopped separated by &&
DEFAULT_BEFORE_STOPSERVICES=""
# commands to execute when services were started again separated by &&
DEFAULT_AFTER_STARTSERVICES=""

# email to send completion status
DEFAULT_EMAIL=""

# Sender emailadress used with ssmtp
DEFAULT_SENDER_EMAIL=""

# Additional parameters for email program (optional)
DEFAULT_EMAIL_PARMS=""

# mailprogram
DEFAULT_MAIL_PROGRAM="mail"

# Telegram token
DEFAULT_TELEGRAM_TOKEN=""
# Telegram target chatid
DEFAULT_TELEGRAM_CHATID=""
# Telegram notifications to send. S(uccess), F(ailure), M(essages as file), m(essages as text)
DEFAULT_TELEGRAM_NOTIFICATIONS="F"

# Send eMail and/or Telegram notification when backup starts
DEFAULT_NOTIFY_START=0

# Send email only in case of errors. Use with care !
DEFAULT_MAIL_ON_ERROR_ONLY=0

# msg level (0 = minimal, 1 = detailed)
DEFAULT_MSG_LEVEL="0"

# Colorize console output (C) and/or email (M)
DEFAULT_COLORING="CM"

# eMail coloring (SUBJECT or OPTION)
DEFAULT_EMAIL_COLORING="SUBJECT"

# restore device
DEFAULT_RESTORE_DEVICE=""

# Default verbose log
DEFAULT_VERBOSE=0

# skip check for remote mount of backup path
DEFAULT_SKIPLOCALCHECK=0

# blocksize used for dd
DEFAULT_DD_BLOCKSIZE=1M
# addition parms used for dd
DEFAULT_DD_PARMS=""

# exclude list
DEFAULT_EXCLUDE_LIST=""

# notify in email if there is an updated script version available
DEFAULT_NOTIFY_UPDATE=1

# extensions to call
DEFAULT_EXTENSIONS="mem temp disk"

# language (DE or EN)
DEFAULT_LANGUAGE="EN"

# hosts which will get the updated backup script with parm -y - non pwd access with keys has to be enabled
# Example: "root@raspberrypi root@fhem root@openhab root@magicmirror"
DEFAULT_DEPLOYMENT_HOSTS=""

# Don't ask for restore confirmation for this device. Use with care !
DEFAULT_YES_NO_RESTORE_DEVICE=""
# Resize root filesystem during restore
DEFAULT_RESIZE_ROOTFS=1
	
# Use hardlinks for partitionbootfiles
DEFAULT_LINK_BOOTPARTITIONFILES=0

# use hardlinks for rsync if possible
DEFAULT_USE_HARDLINKS=1

# save boot partition with tar
DEFAULT_TAR_BOOT_PARTITION_ENABLED=0

# Versions not to generated deprecated messages, separated with commas
DEFAULT_SKIP_DEPRECATED=""

# report uuid
DEFAULT_USE_UUID=1

# Check for bad blocks when formating restore device (Will take a long time)
DEFAULT_CHECK_FOR_BAD_BLOCKS=0

# add timestamps in front of messages
DEFAULT_TIMESTAMPS=0

# add system status in debug log
DEFAULT_SYSTEMSTATUS=0

# Restoretest reminder interval (unit: months)
DEFAULT_RESTORE_REMINDER_INTERVAL=6
# Number of times to remind to test restore
DEFAULT_RESTORE_REMINDER_REPEAT=3

# Options for partitionoriented mode
DEFAULT_PARTITIONBASED_BACKUP="0"
DEFAULT_PARTITIONS_TO_BACKUP="1 2"

# Name of backup partition to dynamically mount (e.g. /dev/sda1 or /backup), should be empty to disable dynamic mount
DEFAULT_DYNAMIC_MOUNT="/dev/sda1"

# GENERATED - DO NOT DELETE 
UUID=239c4493-bc89-4947-b31a-f2276176184b
pi@piaware:/usr/local/etc $ 

I tried to attach my logfile but Discourse won’t let me and the number of lines in it is too many to copy/paste.

Second try:

20210926-040408 DBG 1721:      --> initializeDefaultConfigVariables 
20210926-040408 DBG 1855:      <-- initializeDefaultConfigVariables 
20210926-040408 DBG 1860:      --> copyDefaultConfigVariables 
20210926-040408 DBG 1960:          --> substituteNumberArguments 
20210926-040408 DBG 1987:          <-- substituteNumberArguments 
20210926-040408 DBG 1931:      <-- copyDefaultConfigVariables 
20210926-040408 DBG 2702:      --> readConfigParameters 
20210926-040408 DBG 2758:      <-- readConfigParameters 
20210926-040408 DBG 1860:      --> copyDefaultConfigVariables 
20210926-040408 DBG 1960:          --> substituteNumberArguments 
20210926-040408 DBG 1987:          <-- substituteNumberArguments 
20210926-040408 DBG 1931:      <-- copyDefaultConfigVariables 
20210926-040408 DBG 1642:      --> logOptions Standard option files
20210926-040408 DBG 1644:      --- Options:  -a : -o : -z -m detailed /mnt/backup
20210926-040408 DBG 1645:      --- APPEND_LOG=0
20210926-040408 DBG 1646:      --- APPEND_LOG_OPTION=-a
20210926-040408 DBG 1647:      --- BACKUPPATH=/mnt/backup
20210926-040408 DBG 1648:      --- BACKUPTYPE=rsync
20210926-040408 DBG 1649:      --- AFTER_STARTSERVICES=
20210926-040408 DBG 1650:      --- BEFORE_STOPSERVICES=
20210926-040408 DBG 1651:      --- CHECK_FOR_BAD_BLOCKS=0
20210926-040408 DBG 1652:      --- COLORING=CM
20210926-040408 DBG 1653:      --- CONFIG_FILE=
20210926-040408 DBG 1654:      --- DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=0
20210926-040408 DBG 1655:      --- DD_BLOCKSIZE=1M
20210926-040408 DBG 1656:      --- DD_PARMS=
20210926-040408 DBG 1657:      --- DD_WARNING=0
20210926-040409 DBG 1658:      --- DEPLOYMENT_HOSTS=
20210926-040409 DBG 1659:      --- DYNAMIC_MOUNT=/dev/sda1
20210926-040409 DBG 1660:      --- EMAIL=
20210926-040409 DBG 1661:      --- EMAIL_COLORING=SUBJECT
20210926-040409 DBG 1662:      --- EMAIL_PARMS=
20210926-040409 DBG 1663:      --- EXCLUDE_LIST=
20210926-040409 DBG 1664:      --- EXTENSIONS=mem temp disk
20210926-040409 DBG 1665:      --- FAKE=
20210926-040409 DBG 1666:      --- HANDLE_DEPRECATED=
20210926-040409 DBG 1667:      --- IGNORE_ADDITIONAL_PARTITIONS=0
20210926-040409 DBG 1668:      --- KEEPBACKUPS=3
20210926-040409 DBG 1669:      --- KEEPBACKUPS_DD=0
20210926-040409 DBG 1670:      --- KEEPBACKUPS_DDZ=0
20210926-040409 DBG 1671:      --- KEEPBACKUPS_TAR=0
20210926-040409 DBG 1672:      --- KEEPBACKUPS_TGZ=0
20210926-040409 DBG 1673:      --- KEEPBACKUPS_RSYNC=0
20210926-040409 DBG 1674:      --- LANGUAGE=EN
20210926-040409 DBG 1675:      --- LINK_BOOTPARTITIONFILES=0
20210926-040409 DBG 1676:      --- LOG_LEVEL=1
20210926-040409 DBG 1677:      --- LOG_OUTPUT=2
20210926-040409 DBG 1678:      --- MAIL_ON_ERROR_ONLY=0
20210926-040409 DBG 1679:      --- MAIL_PROGRAM=mail
20210926-040409 DBG 1680:      --- MSG_LEVEL=0
20210926-040409 DBG 1681:      --- NOTIFY_START=0
20210926-040409 DBG 1682:      --- NOTIFY_UPDATE=1
20210926-040409 DBG 1683:      --- PARTITIONBASED_BACKUP=0
20210926-040409 DBG 1684:      --- PARTITIONS_TO_BACKUP=1 2
20210926-040409 DBG 1685:      --- RESIZE_ROOTFS=1
20210926-040409 DBG 1686:      --- RESTORE_DEVICE=
20210926-040409 DBG 1687:      --- ROOT_PARTITION=
20210926-040409 DBG 1688:      --- RSYNC_BACKUP_ADDITIONAL_OPTIONS=
20210926-040409 DBG 1689:      --- RSYNC_BACKUP_OPTIONS=-aHAx --delete
20210926-040409 DBG 1690:      --- RSYNC_IGNORE_ERRORS=
20210926-040409 DBG 1691:      --- SENDER_EMAIL=
20210926-040409 DBG 1692:      --- SKIP_DEPRECATED=
20210926-040409 DBG 1693:      --- SKIPLOCALCHECK=0
20210926-040409 DBG 1694:      --- SMART_RECYCLE=0
20210926-040409 DBG 1695:      --- SMART_RECYCLE_DRYRUN=1
20210926-040409 DBG 1696:      --- SMART_RECYCLE_OPTIONS=7 4 12 1
20210926-040409 DBG 1697:      --- STARTSERVICES=:
20210926-040409 DBG 1698:      --- STOPSERVICES=:
20210926-040409 DBG 1699:      --- SYSTEMSTATUS=0
20210926-040409 DBG 1700:      --- TAR_BACKUP_ADDITIONAL_OPTIONS=
20210926-040409 DBG 1701:      --- TAR_BACKUP_OPTIONS=-cpi --one-file-system
20210926-040409 DBG 1702:      --- TAR_BOOT_PARTITION_ENABLED=0
20210926-040409 DBG 1703:      --- TAR_IGNORE_ERRORS=
20210926-040409 DBG 1704:      --- TAR_RESTORE_ADDITIONAL_OPTIONS=
20210926-040409 DBG 1705:      --- TELEGRAM_TOKEN=
20210926-040409 DBG 1706:      --- TELEGRAM_CHATID=
20210926-040409 DBG 1707:      --- TELEGRAM_NOTIFICATIONS=F
20210926-040409 DBG 1708:      --- TIMESTAMPS=0
20210926-040409 DBG 1709:      --- UPDATE_UUIDS=0
20210926-040409 DBG 1710:      --- USE_HARDLINKS=1
20210926-040409 DBG 1711:      --- VERBOSE=0
20210926-040409 DBG 1712:      --- YES_NO_RESTORE_DEVICE=
20210926-040409 DBG 1713:      --- ZIP_BACKUP=0
20210926-040409 DBG 1715:      <-- logOptions 
20210926-040409 DBG 7387:      --> checkOptionParameter -a :
20210926-040409 DBG 7408:      <-- checkOptionParameter :
20210926-040409 DBG 7387:      --> checkOptionParameter -o :
20210926-040409 DBG 7408:      <-- checkOptionParameter :
20210926-040409 DBG 7387:      --> checkOptionParameter -m detailed
20210926-040409 DBG 7408:      <-- checkOptionParameter detailed
20210926-040409 DBG 1960:      --> substituteNumberArguments 
20210926-040409 DBG 1987:      <-- substituteNumberArguments 
20210926-040409 DBG 7984:  --- RESTORE: 0 - fileParameter: /mnt/backup
20210926-040409 DBG 8004:  --- Enabling trap handler
20210926-040409 DBG 1367:  --- TRAP cleanup SIGINT SIGTERM EXIT
20210926-040409 DBG 3027:      --> colorAnnotation 1
20210926-040409 DBG 3051:      <-- colorAnnotation 
20210926-040409 DBG 2763:      --> setupEnvironment 
20210926-040410 DBG 2767:      --- Previous logfile: /home/@USER@/raspiBackup.log
20210926-040410 DBG 2069:          --> dynamic_mount /dev/sda1
20210926-040410 DBG 2618:              --> isMounted /dev/sda1
20210926-040410 DBG 2620:                  *** cat /proc/mounts
20210926-040410 DBG 2620:                      /dev/root / ext4 rw,noatime 0 0
20210926-040410 DBG 2620:                      devtmpfs /dev devtmpfs rw,relatime,size=439400k,nr_inodes=109850,mode=755 0 0
20210926-040410 DBG 2620:                      sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
20210926-040410 DBG 2620:                      proc /proc proc rw,relatime 0 0
20210926-040410 DBG 2620:                      securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
20210926-040410 DBG 2620:                      tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
20210926-040410 DBG 2620:                      devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
20210926-040410 DBG 2620:                      tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
20210926-040410 DBG 2620:                      tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
20210926-040410 DBG 2620:                      tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
20210926-040410 DBG 2620:                      cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
20210926-040410 DBG 2620:                      none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
20210926-040410 DBG 2620:                      cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
20210926-040410 DBG 2620:                      systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct 0 0
20210926-040410 DBG 2620:                      debugfs /sys/kernel/debug debugfs rw,relatime 0 0
20210926-040410 DBG 2620:                      mqueue /dev/mqueue mqueue rw,relatime 0 0
20210926-040410 DBG 2620:                      sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
20210926-040410 DBG 2620:                      configfs /sys/kernel/config configfs rw,relatime 0 0
20210926-040410 DBG 2620:                      /dev/mmcblk0p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0
20210926-040410 DBG 2620:                      binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
20210926-040410 DBG 2620:                      tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=94536k,mode=700,uid=1000,gid=1000 0 0
20210926-040410 DBG 2626:              <-- isMounted 1
mount: /dev/sda1: can't find in /etc/fstab.
20210926-040410 DBG 3027:              --> colorAnnotation 1
20210926-040410 DBG 3051:              <-- colorAnnotation 
20210926-040410 DBG 1452:              --> exitError 131
20210926-040410 DBG 1459:              <-- exitError 131
20210926-040410 DBG 3494:              --> cleanup 
20210926-040410 DBG 3027:                  --> colorAnnotation 1
20210926-040410 DBG 3051:                  <-- colorAnnotation 
20210926-040410 DBG 3758:                  --> cleanupBackup 
20210926-040410 DBG 3760:                  --- Got trap EXIT
20210926-040410 DBG 3761:                  --- rc: 131
20210926-040410 DBG 1232:                      --> callExtensions post
20210926-040410 DBG 1259:                      --- Calling raspiBackup_mem_post.sh 131
20210926-040410 DBG 1502:                          --> executeShellCommand . raspiBackup_mem_post.sh 131
20210926-040410 DBG 3027:                              --> colorAnnotation 1
20210926-040410 DBG 3051:                              <-- colorAnnotation 
20210926-040410 DBG 1509:                          <-- executeShellCommand 0
20210926-040410 DBG 1262:                      --- Extension RC: 0
20210926-040410 DBG 1259:                      --- Calling raspiBackup_temp_post.sh 131
20210926-040410 DBG 1502:                          --> executeShellCommand . raspiBackup_temp_post.sh 131
20210926-040410 DBG 3027:                              --> colorAnnotation 1
20210926-040410 DBG 3051:                              <-- colorAnnotation 
20210926-040410 DBG 1509:                          <-- executeShellCommand 0
20210926-040410 DBG 1262:                      --- Extension RC: 0
20210926-040410 DBG 1259:                      --- Calling raspiBackup_disk_post.sh 131
20210926-040410 DBG 1502:                          --> executeShellCommand . raspiBackup_disk_post.sh 131
20210926-040410 DBG 3027:                              --> colorAnnotation 1
20210926-040410 DBG 3051:                              <-- colorAnnotation 
20210926-040410 DBG 3027:                              --> colorAnnotation 1
20210926-040410 DBG 3051:                              <-- colorAnnotation 
20210926-040410 DBG 1509:                          <-- executeShellCommand 0
20210926-040410 DBG 1262:                      --- Extension RC: 0
20210926-040410 DBG 1272:                      <-- callExtensions 
20210926-040410 DBG 2394:                      --> startServices 
20210926-040410 DBG 1613:                          --> logSystemServices 
20210926-040410 DBG 1622:                          <-- logSystemServices 
20210926-040410 DBG 2420:                      <-- startServices 
20210926-040410 DBG 2424:                      --> executeAfterStartServices 
20210926-040410 DBG 2440:                      <-- executeAfterStartServices 
20210926-040410 DBG 3287:                      --> cleanupBackupDirectory 
20210926-040411 DBG 3289:                          *** ls -la 
20210926-040411 DBG 3289:                              total 428
20210926-040411 DBG 3289:                              drwxr-xr-x 4 pi   pi     4096 Sep 26 04:04 .
20210926-040411 DBG 3289:                              drwxr-xr-x 3 root root   4096 Sep  2 13:28 ..
20210926-040411 DBG 3289:                              -rw------- 1 pi   pi     1273 Sep 26 00:20 .bash_history
20210926-040411 DBG 3289:                              -rw------- 1 pi   pi    13480 Sep 25 03:54 .bash_history-save
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi      220 Sep  2 13:28 .bash_logout
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi     3523 Sep  2 13:28 .bashrc
20210926-040411 DBG 3289:                              drwx------ 3 pi   pi     4096 Sep 10 05:56 .gnupg
20210926-040411 DBG 3289:                              drwxr-xr-x 3 pi   pi     4096 Sep 11 02:40 .local
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi      807 Sep  2 13:28 .profile
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi     2686 Sep 11 08:33 qsi.txt
20210926-040411 DBG 3289:                              -rw-r--r-- 1 root root  12282 Sep 26 04:04 raspiBackup.log
20210926-040411 DBG 3289:                              -rw-r--r-- 1 root root    493 Sep 26 04:04 raspiBackup.msg
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi   275403 Sep 26 03:01 raspiBackup.sh
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi    38704 Sep 26 03:56 raspiBUlog.txt
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi    42807 Sep 26 03:08 rpi-clone
20210926-040411 DBG 3289:                              -rw-r--r-- 1 pi   pi      215 Sep 26 03:08 .wget-hsts
20210926-040411 DBG 3297:                      --- Current user: pi
20210926-040411 DBG 3307:                      --- Current user: pi
20210926-040411 DBG 3027:                          --> colorAnnotation 1
20210926-040411 DBG 3051:                          <-- colorAnnotation 
20210926-040411 DBG 3027:                          --> colorAnnotation 1
20210926-040411 DBG 3051:                          <-- colorAnnotation 
20210926-040411 DBG 3341:                      <-- cleanupBackupDirectory 
20210926-040411 DBG 3774:                  <-- cleanupBackup 
20210926-040411 DBG 3780:                  --> cleanupTempFiles 
20210926-040411 DBG 3787:                  <-- cleanupTempFiles 
20210926-040411 DBG 3521:              --- Terminate now with rc 131
20210926-040411 DBG 3027:                  --> colorAnnotation 1
20210926-040411 DBG 3051:                  <-- colorAnnotation 
20210926-040411 DBG 3027:                  --> colorAnnotation 1
20210926-040411 DBG 3051:                  <-- colorAnnotation 
20210926-040411 DBG 3155:                  --> sendEMail 
20210926-040411 DBG 3277:                  <-- sendEMail 
20210926-040411 DBG 3409:              --- Masquerading some mount options
20210926-040411 DBG 3427:              --- Masquerading home directory name
20210926-040411 DBG 3432:              --- Masquerading hostname
20210926-040411 DBG 3437:              --- Masquerading sensitive non local IPs
20210926-040411 DBG 3599:              <-- cleanup 

This should be the mount point or device, which you need to have configured in fstab.

You could leave it out as a test for now

Can you connect to the share using SMB in file manager?

I’ll try that. Thanks.

Thanks for the idea. Guess I need to fire up my laptop which is running the same distro and version and see if it can see/connect to the share on the desktop PC. I didn’t think of that. I’ll try it tomorrow.

I actually meant from file manager on the Pi (using smb://192.168.1.xxx/pi-clone in the address bar) but i guess that would only be useful if you have a GUI on it.

Re: the shared directory on my desktop PC I found out that samba is broken on it and I’ll need to reinstall my distro to fix it as I’m pretty sure that when I installed said distro I unselected samba within its installer’s options, and I’m going to put that off because they’ll be releasing a new Bullseye-based version within the next few weeks so I’ll need to reinstall from scratch then anyway as the current version is Buster-based.

Re: running a manual backup into a mounted USB stick with

sudo bash ./raspiBackup.sh -a : -o : -z -m detailed /mnt/backup

still fails with two errors (or one warning message and one error) after removing the destination path and directory from its config file::

??? RBK0079E: Option -z not allowed with backuptype rsync.
--- RBK0010I: piaware: raspiBackup.sh V0.6.6 (262862c) stopped at Mon 27 Sep 08:36:03 UTC 2021 with rc 107.

I have no idea what rc 107 means.

compression is not available on rsync and in any case, rsync would only work if you were backing up to a device running that service, it doesn’t work on physical devices so you would need to use -t dd or -t tar

also, I don’t think you need the colons

Thanks! Running

sudo bash ./raspiBackup.sh -t dd -z -m detailed /mnt/backup

worked. :grinning: It resulted in a file piaware-ddz-backup-20210928-075832.img.gz which I can uncompress then burn back to the SD card.

v0.6.7

Repository: framps/raspiBackup · Tag: v0.6.7 · Commit: 3e24488 · Released by: framps

Features

  • Add a “restore completed” and “restore ready” extension point #420

Enhancements

  • raspiBackup.msg not being created on new install? #437
  • Disable non supported environments #435
  • Create different Logfiles for Backup and Restore #432
  • Allow to customize color codes for console and html in eMail #360

Bugfixes

  • Make lookup for meta data files more robust #415
  • Restore with option -g misses progress indication for root partition #406
  • Check whether pv is installed if option -g is used #405
  • Restore terminates with RC112 for a Bullseye backup with no error message #400
  • Some files were not deleted when raspiBackup was uninstalled #397

For a detailed list of issues in this release see here

This release has 2 assets:

  • Source code (zip)
  • Source code (tar.gz)

Visit the release page to download them.

That was mine! :joy:

1 Like

v0.6.7

Repository: framps/raspiBackup · Tag: v0.6.7 · Commit: efce407 · Released by: framps

Features

  • Add a “restore completed” and “restore ready” extension point #420
  • Use hardlinks for option -m #471

Enhancements

  • Reject unsupported environments if option --unsupportedEnvironment is not used #435
  • raspiBackup.msg not being created on new install? #437
  • Disable non supported environments #435
  • Create different Logfiles for Backup and Restore #432
  • Allow to customize color codes for console and html in eMail #360
  • Add config option which causes raspiBackup to initiate a reboot when the backup finished #449
  • Make sure services stopped are restarted when CTRL-C is used #221
  • Execute post plugins even there was a backup failure #454

Bugfixes

  • Make lookup for meta data files more robust #415
  • Restore with option -g misses progress indication for root partition #406
  • Check whether pv is installed if option -g is used #405
  • Restore terminates with RC112 for a Bullseye backup with no error message #400
  • Some files were not deleted when raspiBackup was uninstalled #397
  • Fixed freespace calculation for restore #475
  • Allow to update raspiBackup version to latest version even a beta is available #468

For a detailed list of issues in this release see here

This release has 2 assets:

  • Source code (zip)
  • Source code (tar.gz)

Visit the release page to download them.

 

1 Like

v0.6.7.1

Repository: framps/raspiBackup · Tag: v0.6.7.1 · Commit: 0945f86 · Released by: framps 18 minutes ago

This release is raspiBackup 0.6.7 with NVMe support included.

1 Like

v0.6.8

Repository: framps/raspiBackup · Tag: v0.6.8 · Commit: 966349d · Released by: framps

Features (3)

  • NVMe support for CM4 #412 (was already available inofficially as 0.6.7.1)
  • Pushover support for notifications #550
  • Slack support for notifications #551

Enhancements (7)

  • Write message when there is no version and sha set in code #536
  • Create something like DEFAULT_FINAL_COMMANDS #535
  • Write backup tool messages also on screen and in message file/email #531
  • Disable progress messages (option -g) if raspiBackup is executed in background #527
  • Catch cleanup errors and let raspiBackup fail #520
  • Automount creates /media/pi directory with ACLs and aborts raspiBackup #516
  • restore aborts if usbmount is installed #515

Bugfixes (2)

  • Backup mount point not stored in backup #513
  • RBK0273E received because @eaDir exists in backup dir on a Synology #530

For a complete and detailed list of issues in this release see here

This release has 2 assets:

  • Source code (zip)
  • Source code (tar.gz)

Visit the release page to download them.


You are receiving this because you are watching this repository.
View it on GitHub

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.