When you've got multiple XBMC/Kodi nodes all sharing same media library, it's good to use MySQL as a single database, but also means you're putting all eggs in 1 basket, so you're only a disk or dodgy upgrade away from losing the library data.
I have a little backup script:
#!/bin/sh
DIR=/path/db_backup
DATE=i$(date "+%d%m%y")
mysqldump -u root -pyour_pwd --all-databases > $DIR/db_backup_$DATE.sql
gzip $DIR/db_backup_$DATE.sql
And an archiver
find /root/db_backup -mtime +14 -exec rm {} \;
Might be safer ways of doing this - so make sure you've got the path right ;)
I have a little backup script:
#!/bin/sh
DIR=/path/db_backup
DATE=i$(date "+%d%m%y")
mysqldump -u root -pyour_pwd --all-databases > $DIR/db_backup_$DATE.sql
gzip $DIR/db_backup_$DATE.sql
And an archiver
find /root/db_backup -mtime +14 -exec rm {} \;
Might be safer ways of doing this - so make sure you've got the path right ;)
No comments:
Post a Comment