rsync + mysql backup

  • I have OpenKM 6.3 working on OpenMediaVault NAS server with MySQL as the db engine.


    The mysqldata directory has ibdata1 file of 622Mb and I use the following Backup commands for MySQL

    Code
    # Perform the database dump and compression
    echo "Dumping MySQL databases..." >> "$LOGFILE"
    mysqldump --user=$user --password=$password --single-transaction --events --all-databases > $backup_path/$dbname-$date.sql
    
    
    echo "Compressing database backup..." >> "$LOGFILE"
    bzip2 $backup_path/$dbname-$date.sql
    chmod 600 $backup_path/$dbname-$date.sql.bz2


    the file size after the above commands is only 60Mb, can this be right? what is the 600Mb ibdata1 file?


    Code
    # Synchronise directories ...
    echo "Please wait, syncing 
    </media/a7e96974-7965-4103-9743-281802f3d956//openkm> to 
    </media/854fe912-9f08-423d-9bc8-26a404cae6d0/openkm> ...\n"
    rsync
     --verbose --log-file="/var/log/rsync.log" --recursive --times --archive
     --delete --perms --acls --xattrs 
    "/media/a7e96974-7965-4103-9743-281802f3d956//openkm/" 
    "/media/854fe912-9f08-423d-9bc8-26a404cae6d0/openkm" & wait $!


    Are the two things above sufficient to ensure a fullbackup on a daily basis?
    The developer has suggested the rsync cannot be restored after 2 or 3 days and that i should use rdiff-backup.


    any thoughts?

    • Offizieller Beitrag

    Database dumps are just a lot of text which normally compresses very well. So, that looks fine. The ibdata1 file is a working database file - saved queries and other info to speed it up. No need to save it.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Sounds like rsync is backing up openkm. Combine that with the database dump and you should be good to go. Not sure why he recommends rdiff-backup since I have never used openkm before.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!