- Removed 40+ broken/messy scripts, moved to old_scripts/ - Created lvm_block_backup.sh - proper block-level LVM snapshot backup - Uses dd for block-level cloning instead of file-level rsync - Successfully tested: 462GB backup in 33 minutes - Creates exact, bootable clone of internal drive to external drive - Proper LVM snapshot management with cleanup - Clear documentation in README_BACKUP.md - Clean, minimal solution that actually works
29 lines
836 B
Bash
29 lines
836 B
Bash
#!/bin/bash
|
|
# Create automatic startup script for Clonezilla Live
|
|
|
|
cat > /tmp/auto-backup-startup.sh << 'EOF'
|
|
#!/bin/bash
|
|
# Automatic startup script for Clonezilla Live
|
|
# This runs when auto_backup=true is passed as kernel parameter
|
|
|
|
if grep -q "auto_backup=true" /proc/cmdline; then
|
|
echo "Automatic backup mode detected"
|
|
sleep 3
|
|
|
|
# Mount the backup partition
|
|
mkdir -p /tmp/backup_mount
|
|
mount /dev/sda2 /tmp/backup_mount 2>/dev/null
|
|
|
|
if [ -f /tmp/backup_mount/automated_clonezilla_backup.sh ]; then
|
|
echo "Running automated backup script..."
|
|
/tmp/backup_mount/automated_clonezilla_backup.sh
|
|
else
|
|
echo "Automated backup script not found, starting manual Clonezilla"
|
|
ocs-live-general
|
|
fi
|
|
fi
|
|
EOF
|
|
|
|
chmod +x /tmp/auto-backup-startup.sh
|
|
echo "Auto-startup script created"
|