On Fri, 03 May 2013 14:01:10 +0300 ellanios82 ellanios82 wrote:
- floundering around in the dark, i sadly have no record of my desperation :(( [ i do not think it was a /home/home error ]
Okay, this isn't as important now since your second 'restore' succeeded.
my reserve backups were on a hard disk not normally mounted :
- firstly, i mounted the reserve partition on mount-point /mnt
- next i changed directory to /mnt
- finally i gave the command as root :
" rsync -avr ./ [source being /mnt ] / [target directory] "
The first problem here could be recursion into '/mnt'. I don't do this so maybe if source_'/mnt' = target_'/mnt' no harm, no foul. Sounds feasible. I'm curious to know, however: What steps do you take to arrive at this point? Do you boot to rescue mode using the installation DVD? Do you switch to systemd's equivalent of 'runlevel 1'? (single user mode, no network, minimal processes; a.k.a. 'maintenance mode' in some OSes?) Also, the 'r' flag in this use case is redundant. It /may/ actually be harmful. '-a' means 'archive' mode, which preserves timestamps, owners and permissions, much like tar, and it is already explicitly recursive. If you then follow up with 'r', it is possible that the 'r' supersedes the preceding '-a', in which case you could get recursion without preservation of timestamps, owners and permissions. I'll leave it to you to test this hypothesis or others to clarify what the behavior will actually be under these circumstances.
On 05/03/2013 01:42 PM, Carl Hartung wrote:
exact commands that you issued to create the backups and to attempt/implement the 'restores.' <snipped> # use rsync to backup /home to /dev/sda2 # mount -t ext4 /dev/sda2 /mnt_cron # df cd /home/pisti
This 'cd' is redundant. You're declaring explicit 'source' and 'target' paths on the next line.
rsync -avr --delete --delete-after --exclude=/ /home/ /mnt_cron
See my note, above, regarding appending 'r' after the '-a'.
cd
Another redundant 'cd'.
# cp /mnt_cron/etc/fstab.5bak /mnt_cron/etc/fstab df umount /mnt_cron cd
Another redundant 'cd'. <snipped>
# use rsync to backup WHOLE system / to /dev/sdb4 # mount -t ext4 /dev/sdb4 /mnt_cron # df cd
Another redundant 'cd'.
rsync -avr --delete --delete-after --exclude=/dev/shm --exclude=/DVD --exclude=/media --exclude=/mnt --exclude=/mnt_cron --exclude=/proc --exclude=/run --exclude=subdomain --exclude=/sys --exclude=/tmp --exclude=/var/lib/ntp --exclude=/var/run --exclude=/var/tmp / /mnt_cron
Again: See my note, above, regarding appending 'r' after the '-a'. This is possible 'nit picking' or more a matter of personal habits, but I always wrap my excludes in single quotes (when I use them) e.g. --exclude='/somepath/' So, I gather you are taking 'live' snapshots from a running system and storing them in the running system, albeit on devices that aren't normally mounted. YMMV but I don't do it this way. I keep backups completely isolated from running systems in case of catastrophic hardware failures. Why? Because I once experienced a full system meltdown (literally) and learned a very hard lesson. However, if this method works for you and you're happy with it, don't change a thing. One other item: I use the flags '-avAX' followed by '--delete' without the '--delete-after'. More below.
cd
Another redundant 'cd'.
# cp /etc/fstab_4B_BAK /mnt_cron/etc/fstab # DEBUG DEBUG DEBUG - No Mount Point SDA4 df umount /mnt_cron cd
Another redundant 'cd'. For comparison, the backup routine I go through is as follows. Note: the number of partitions here has been reduced for clarity: boot to 'rescue mode' using installation media log in as 'root' (does not require password) cd /mnt mkdir sda2 sda3 sdb2 sdb3 mount /dev/sda2 sda2 && mount /dev/sda3 sda3 && \ mount /dev/sdb2 sdb2 && mount /dev/sdb3 sdb3 rsync -avAX --delete sda2/ sdb2 rsync -avAX --delete sda3/ sdb3 umount sda2 sda3 sdb2 sdb3 eject /dev/sr0 poweroff Once the power is off, I detach the external USB drive (sdb) and then boot the system. I don't bother with excludes for these reasons: First, hard drives are so large and fast, now, that the extra time and space consumed (in my specific case) are inconsequential. YMMV. Second, I can't tell you how many times I've had important data inadvertently omitted because their file names (or paths) included strings matching the exclude criteria. Lastly, sometimes I'm lazy or tired or in a hurry and prone to more typos. Writing and correcting (and re-correcting) long strings of excludes is too much work. Even when scripted, there's always the maintenance factor 'x' months or 'y' years down the road -- after significant changes in / additions to the installation. YMMV. hth & regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org