Please familiarise yourself with the forum, including policy on feature requests, rules & guidelines

Deluge Backup Mac

1

Small app for mac users for making incremental backups of SD Deluge cards. BackupDeluge works like MacOS Time Machine: only modified files are actually stored. This allows to save disk and to keep all snapshots distinct, so you can easily restore any of them.

Backups are kept under user's Documents/Deluge-Backup/[Card-Name] folder

Just place the app on SD card root and launch it whenever you want a backup.

Please note that - in order to save more disk space - not all samples are stored, but only the ones in SAMPLES/RESAMPLE plus every sample used in some song, synth or kit.

https://neuma.studio/deluge-backup-mac.html

Comments

  • 0
    HeptagenHeptagen Posts: 277

    Awesome! I need something like this for win though. Still, great for mac users.

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55

    @Heptagen said:
    Awesome! I need something like this for win though. Still, great for mac users.

    Under the hood the utility uses a bunch of standard unix command-line tools that are bundled with macOS: find, cat, sed and rsync.

    Unfortunately I haven't found an easy way to find equivalents on windows without installing too much stuff, but I can share the script for anyone interested!

  • 0

    Can't you just add the SD card to your Time Machine backups? I have other external drives added to my Time Machine.

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55

    This script saves only samples referenced in some synth, song or kit

  • 0
    mattcoleymattcoley United StatesPosts: 1

    I know this is quite old, but I would love to see the script. I'm more of a Windows dev, so maybe I can adapt it.

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55
    edited January 2023

    Sure!

    Here's the script:
    https://neuma.studio/deluge-backup-mac.html

    And here's the script that does the actual job:

    #!/bin/bash
    BACKUP_SCRIPT=./rsync_tmbackup.sh 
    INCLUDE_FILE=/tmp/deluge_include.txt
    SD_PATH=../../..
    SD_NAME=$(basename "$(cd ../../.. ; pwd)")
    BACKUP_PATH=~/Documents/Deluge-Backup/${SD_NAME// /_}
    
    # Adds XML files themselves
    find $SD_PATH -name "*.XML" > $INCLUDE_FILE
    
    # Adds samples referenced in some XML file
    find $SD_PATH -name "*.XML" -exec cat {} + | sed -ne '/fileName/{s/.*<fileName>\(.*\)<\/fileName>.*/\1/p;}' | sort -u | tail -n +2 >> $INCLUDE_FILE
    find $SD_PATH -name "*.XML" -exec cat {} + | sed -ne '/filePath/{s/.*filePath="\(.*\)".*/\1/p;}' | sort -u | tail -n +2 >> $INCLUDE_FILE
    find $SD_PATH -name "*.XML" -exec cat {} + | sed -ne '/fileName/{s/.*fileName="\(.*\)".*/\1/p;}' | sort -u | tail -n +2 >> $INCLUDE_FILE
    
    # Adds all samples from downmix fixed folder
    find $SD_PATH/SAMPLES/RESAMPLE -name "*.WAV" >> $INCLUDE_FILE
    
    #echo "PROGRESS:0"
    mkdir -p "$BACKUP_PATH"
    touch "$BACKUP_PATH/backup.marker"
    
    #echo "PROGRESS:10"
    $BACKUP_SCRIPT --rsync-append-flags "--files-from=$INCLUDE_FILE" "$SD_PATH" "$BACKUP_PATH"
    
    #echo "PROGRESS:90"
    ls -lR "$SD_PATH/SAMPLES/" > "$BACKUP_PATH/sample_ls.txt"
    
    echo $BACKUP_PATH
    echo "NOTIFICATION:Deluge backup completed"
    echo "done!"
    
    Post edited by drbourbon on
  • 0
    SixQuartFlushSixQuartFlush Denver, Colorado, USAPosts: 14

    Just wanted to show my appreciation to drbourbon, this makes backing up incremental changes SO EASY <3 <3 <3

    Thank you!!!!

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55

    You’re welcome ❤️ I use it all the time myself!

  • 0
    dannytaurusdannytaurus Los AngelesBeta Tester Posts: 31

    I love this app! I use a simple Automator script to run the app every time the SD is detected on my Mac. So easy to keep regular backups!

    Question - is there any way to modify the script so the app quits when the backup is finished? When I try to eject the SD card it always catches me out and I have to manually quit the app! 😆

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55

    @dannytaurus said:
    ...
    Question - is there any way to modify the script so the app quits when the backup is finished? When I try to eject the SD card it always catches me out and I have to manually quit the app! 😆

    I've updated the tool so that the underlying backup script can be called directly from Automator routines.

    Here's the new (untested) version https://github.com/drbourbon/deluge-macos-backup/releases/tag/1_2

    The script to be called is:
    <SD ROOT>/BackupDeluge.app/Contents/Resources/script

  • 0
    HannesHannes GermanyPosts: 83

    Hi everyone,
    thanks for the very nice app! But I noticed, that not all of my folders are backup'ed.
    I have a folder structure that is SD ROOT->SAMPLES->DRUMS->subfolder x,y,z....

    Not all of the subfolders (after DRUMS) for example, get backup'ed. Is that normal ?
    I don't think it has something to do wit files being used or not used as it stores files, that definitely are not used....

    What am I missing here?

    Thanks a ton!

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55

    @Hannes said:
    ...
    Not all of the subfolders (after DRUMS) for example, get backup'ed. Is that normal ?
    I don't think it has something to do wit files being used or not used as it stores files, that definitely are not used....

    Hi Hannes! Sorry to hear that. If any sample from within SD ROOT->SAMPLES->DRUMS is used by at least a song, synth or kit then there's something wrong going on.. Which firmware are you on?

  • 0
    HannesHannes GermanyPosts: 83

    @drbourbon said:

    @Hannes said:
    ...
    Not all of the subfolders (after DRUMS) for example, get backup'ed. Is that normal ?
    I don't think it has something to do wit files being used or not used as it stores files, that definitely are not used....

    Hi Hannes! Sorry to hear that. If any sample from within SD ROOT->SAMPLES->DRUMS is used by at least a song, synth or kit then there's something wrong going on.. Which firmware are you on?

    Hi my friend, I think I misunderstood! I assumed that any folder (ie any sample) that is within the "SAMPLES" folder, is backup'ed. Everything is working fine then. Thank you :)

  • 0
    Fabi_OhmyamFabi_Ohmyam ItalyPosts: 29

    SOrry ,
    I have tried to use it and seams to be working but I can' find the content of the backup nowhere in my mac . can you help me to understand?

  • 0
    alifeinbinaryalifeinbinary Vancouver, CanadaBeta Tester Posts: 19

    Hey @drbourbon,

    I found a bug in the app. I'm getting this output from the app:

    sent 58.63K bytes  received 10.63K bytes  138.52K bytes/sec
    total size is 656.46M  speedup is 9478.22
    rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
    rsync_tmbackup: [ERROR] Rsync reported an error. Run this command for more details: grep -E 'rsync:|rsync error:' '/Users/andrew/.rsync_tmbackup/2023-09-14-032553.log'
    /Users/andrew/Documents/Deluge-Backup/DELUGE_PROD
    done!
    

    I cloned the repository and installed platypus, built and got an error which I was able to clear by changing line 3 in backup.sh to BACKUP_SCRIPT=./rsync_tmbackup.sh. After clearing that error I got this ^. I opened up the project and tried looking for any obvious reasons for the error but hit a dead end. How about you, any ideas what might be leading to the bug?

  • 0
    drbourbondrbourbon ItalyBeta Tester Posts: 55
    edited September 2023

    Hey Andrew, sorry to hear about this error. This comes from the the rsync system utility itself. Have you had a chance to see the output of the suggested command?

    grep -E 'rsync:|rsync error:' '/Users/andrew/.rsync_tmbackup/2023-09-14-032553.log'

    Please consider that "code 23" is a generic file transfer error that could be caused by a number of reasons, including an actual file access error due to a faulty media (just as a very cautionary warning)

    Post edited by drbourbon on
Sign In or Register to comment.