• Tar backup script

    From Rick Smith@1:105/10.1 to All on Wed Dec 9 22:26:48 2020
    Greetings All!

    I am finally getting around to making backups of all my machines and I have a nifty script that does in fact work as I intended.. It could be better tho.. My question is can I set the two backup directories? So when the backup runs it copies the tar to a backup dir local, but I want it to also copy it to a mounted nfs drive, without running the backup twice if that is possible?

    #!/bin/bash
    rm -rf ~/.local/share/Trash/*
    DATE=$(date +%d-%m-%Y) BACKUP_DIR="/z/backups" #BACKUP_DIR2="/home/fido/backup" #To backup fido's home directory cd /home/fido tar --exclude="/home/fido/Downloads" --exclude="/home/fido/backup" --exclude="/home/fido/.cache" --exclude="/home/fid>
    #tar --exclude="/home/fido/Downloads" --exclude="/home/fido/backup" --exclude="/home/fido/.cache" --exclude="/home/fi>
    The second tar line that is commented out is the nfs drive I would also like the backup to go to, is there a way I guess to incorporate both destinations in one command line?



    ----
    Regards,


    Rick Smith (Nitro)

    ... BBSing is irrelevant. You will be assimilated. --Sysop of Borg
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ----> Abacus Sysop Point --->>>>bbs.abon.us:2323 (1:105/10.1)
  • From Gerrit Kuehn@2:240/12 to Rick Smith on Thu Dec 10 10:06:54 2020
    Hello Rick!

    09 Dec 20 22:26, Rick Smith wrote to All:

    The second tar line that is commented out is the nfs drive I would
    also like the backup to go to, is there a way I guess to incorporate
    both destinations in one command line?

    I'm not sure I understand what you are aiming for. You could send the tar output through tee to create two destination files, would that help? But why don't you just copy the first backup to the second location after the first one is created and done?

    Generally, I'd suggest to move away from home-made backup scripts on that level and use dedicated software like restic instead.


    Regards,
    Gerrit

    ... 10:06AM up 50 days, 21:07, 8 users, load averages: 0.36, 0.33, 0.33

    --- Msged/BSD 6.1.2
    * Origin: A love pays love for lying (2:240/12)
  • From Nigel Reed@1:124/5016 to Rick Smith on Thu Dec 10 04:49:00 2020
    Rick wrote:
    Greetings All!

    I am finally getting around to making backups of all my machines and I have a nifty script that does in fact work as I intended.. It could be better tho.. My question is can I set the two backup directories? So when the backup runs it copies the tar to a backup dir local, but I want it to also copy it to a mounted nfs drive, without running the backup twice if that is possible?

    #!/bin/bash
    rm -rf ~/.local/share/Trash/*
    DATE=$(date +%d-%m-%Y) BACKUP_DIR="/z/backups" #BACKUP_DIR2="/home/fido/backup" #To backup fido's home directory cd /home/fido tar --exclude="/home/fido/Downloads" --exclude="/home/fido/backup" --exclude="/home/fido/.cache" --exclude="/home/fid>
    #tar --exclude="/home/fido/Downloads" --exclude="/home/fido/backup" --exclude="/home/fido/.cache" --exclude="/home/fi>
    The second tar line that is commented out is the nfs drive I would also like the backup to go to, is there a way I guess to incorporate both destinations in one command line?

    Maybe I can recommend a peice of free software called burp backup. You simply compile on a Linux server and configure for each client, then install on your linux or Windows clietn. It's very lightweight, uses deduplication techniques, generates its own certificates for security and encyrption. I've been using it for years and it's saved my ass a couple of times. Restore is extremely quick and I usually send the author a donation when it has bailed me out.

    Support is via mailing list and the author is responsive to support requests.

    Personally, I have a cheap storage server on another continent so I can be
    sure if I'm nuked, everything else is safe :)

    https://burp.grke.org
    --- SBBSecho 3.11-Linux
    * Origin: End Of The Line BBS - endofthelinebbs.com (1:124/5016)