• A query about rsync

    From faeychild@2:250/1 to All on Fri Oct 4 09:08:48 2019


    I have done a little Google searching for rsync
    One site suggest the obvious approach of mounting the backup media and running this sort of command

    $ sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/ lost+found"}
    /mnt


    fair enough but

    I have a question about exclusions

    Are not some of the files in /dev and /sys required for boot and need
    to be backed up.

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Fri Oct 4 10:51:16 2019
    On Fri, 4 Oct 2019 18:08:48 +1000, faeychild wrote:


    I have done a little Google searching for rsync
    One site suggest the obvious approach of mounting the backup media and running this sort of command

    $ sudo rsync -aAXv /

    --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/ lost+found"}
    /mnt


    fair enough but

    I have a question about exclusions

    Are not some of the files in /dev and /sys required for boot and need
    to be backed up.

    Basically, what you are seeing are files that only exist in memory, or dynamically built, usually during boot or media insertion.

    If you to not exclude those files, the rsync restore would create the
    space on the drive and next boot, would still use the space from ram
    and you are just wasting space on the disk.

    Your example rsync is for a mounted/running / and I would not depend
    on it working well upon a restore. For instance, your sql database
    might not restore correctly.

    Since I rotate three partitions for / (previous, current, next) installs,
    I usually boot the previous install (mga6) and rsync mag7 into my
    Production hot backup partition. No excludes required.

    I have a nightly cron job checking all /lost+found partitions for any
    lost files so I don't bother excluding it.






    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Fri Oct 4 14:27:31 2019
    On 2019-10-04, faeychild <faeychild@nomail.afraid.org> wrote:


    I have done a little Google searching for rsync
    One site suggest the obvious approach of mounting the backup media and running this sort of command

    $ sudo rsync -aAXv /

    --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/ lost+found"}
    /mnt


    fair enough but

    I have a question about exclusions

    Are not some of the files in /dev and /sys required for boot and need
    to be backed up.


    They are created on the fly by the kernel. They are not files
    which are located on or take up any space on the disk.



    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Fri Oct 4 21:46:08 2019
    On 4/10/19 7:51 pm, Bit Twister wrote:


    Basically, what you are seeing are files that only exist in memory, or dynamically built, usually during boot or media insertion.



    Thanks to
    William and Bit Twister.

    I some how had the idea that these directories had hardwired files in them.
    I know that proc is virtual

    To Bits: This will be run from sysrescue- filesystems not mounted

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Oct 5 02:02:34 2019
    On Sat, 5 Oct 2019 06:46:08 +1000, faeychild wrote:

    To Bits: This will be run from sysrescue- filesystems not mounted

    Then your sysrescue commands would be something like

    mkdir /src
    mkdir /dest

    mount -t auto LABEL=mga7 /src
    mount -t auto LABEL=some_label_goes_here /dest

    rsync -aAXv /src/ /dest

    umount /src
    umount /dest

    I can suggest creating a script so you can test return code/status
    of each command and abort if not success.

    I keep all my system scripts in /local/bin. In your setup it would be

    mkdir /local
    mount -t auto LABEL=local /local
    /local/bin/bkup_mga7
    unount /local

    Lots less chance of screwing up and the script can make all sorts of checks/log.



    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sat Oct 5 03:24:51 2019
    On 5/10/19 11:02 am, Bit Twister wrote:

    mkdir /src
    mkdir /dest

    mount -t auto LABEL=mga7 /src
    mount -t auto LABEL=some_label_goes_here /dest


    Funny you should mention it Bits. I was wandering through the
    Supermarket this morning thinking, now it's going to be

    rsync (options) /dev/laboriously_long_SSD_name /dev/another_laboriously_long_SSD_name

    maybe I can get away labels,


    and then your post pops up :-)


    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Doug Laidlaw@2:250/1 to All on Sat Oct 5 18:04:38 2019
    On 4/10/19 11:27 pm, William Unruh wrote:
    Are not some of the files in /dev and /sys required for boot and need
    to be backed up.

    They are created on the fly by the kernel. They are not files
    which are located on or take up any space on the disk.


    Therefore, you don't need to restore them from a backup.

    On the more general topic, I use rsnapshot for backups. The
    backer-upper in MCC seems to use the same.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Oct 6 00:03:41 2019
    On 6/10/19 4:04 am, Doug Laidlaw wrote:
    \
    On the more general topic, I use rsnapshot for backups.  The
    backer-upper in MCC seems to use the same.


    I have never noticed the backer-upper in MCC. How does it work on a
    mounted running system?


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)