Re: [Nssbackup-team] [Question #112940]: command line control on full - incremental backup
Question #112940 on nssbackup changed: https://answers.launchpad.net/nssbackup/+question/112940 Status: Answered => Solved Jean-Peer Lorenz changed the question status: Changing status to solved because it is obviously not longer an issue. -- You received this question notification because you are a member of Simple Backup Maintainers, which is an answer contact for nssbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp
Re: [Nssbackup-team] [Question #112940]: command line control on full - incremental backup
Question #112940 on nssbackup changed: https://answers.launchpad.net/nssbackup/+question/112940 Jean-Peer Lorenz proposed the following answer: In nssbackup 0.3 and in sbackup 0.11 (which you should prefer) you can now start the backup process with: in nssbackup: >sbackupd --full in sbackup: >sbackup --full -- You received this question notification because you are a member of NSsbackup team, which is an answer contact for nssbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp
Re: [Nssbackup-team] [Question #112940]: command line control on full - incremental backup
Question #112940 on NSsbackup changed: https://answers.launchpad.net/nssbackup/+question/112940 paolocollector posted a new comment: here is the script: basically it uses mysqldump or mysqladmin to backup mysql (full or incremental) and two scripts to backup svn (will post them too if interested) The script runs every day (if system is running) and performs a full backup after "maxIncDays" days #!/bin/bash # # backup script used by anacron maxIncDays=7 lastFullDateFile="/var/backup.extra/lastFullDateFile" today=`date +%Y%m%d` fullBackup=true function dayDiff (){ dateOfPast=$1 timeStampToday=`date +%s -d $today` timeStampOfPast=`date +%s -d $dateOfPast` secondsInDay=86400 dayDiff=`echo \($timeStampToday - $timeStampOfPast\) / $secondsInDay | bc` echo $dayDiff } #redirect stdout and stderr logFile=/var/backup.extra/log/backup.`date +%Y-%m-%d`.log errFile=/var/backup.extra/log/backup.`date +%Y-%m-%d`.err exec &> $logFile #exec 2> $errFile echo "starting backup"|/usr/bin/wall # if lastFullDateFile does not exist, set it to long time ago (backup will be done) if [ ! -f $lastFullDateFile ] then echo "2101">$lastFullDateFile fi # get the last backup date and comare it to today lastBackupDay=`cat $lastFullDateFile` result=$(dayDiff $lastBackupDay ) # check result for a full or incremental backup if [ "$result" -ge "$maxIncDays" ] then full=true echo "$today">$lastFullDateFile else full=false fi # extract mySql tables if [ "$full" == true ] then echo "full mySql backup begin..." mysqldump -proot --single-transaction --flush-logs --master-data=2 --all-databases --delete-master-logs > /var/backup.extra/mysql/fullBackup.sql echo "full mySql backup end" else echo "incremental mySql backup begin..." mysqladmin -proot flush-logs echo "incremental mySql backup end" fi # extract subversion repository if [ "$full" == true ] then echo "full subversion backup begin..." /opt/scripts/svnFullBackup.pl echo "full subversion backup end" else echo "incremental subversion backup begin..." /opt/scripts/svnIncBackup.pl echo "incremental subversion backup end" fi if [ -x /usr/bin/nssbackupd ] then if [ "$full" == true ] then echo "full nssbackup backup begin..." /usr/bin/nssbackupd echo "full nssbackup backup end" else echo "incremental nssbackup backup begin..." /usr/bin/nssbackupd echo "incremental nssbackup backup end" fi else echo error: /usr/sbin/sbackupd file not found fi echo "backup completed"|/usr/bin/wall -- You received this question notification because you are a member of NSsbackup team, which is an answer contact for NSsbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp
Re: [Nssbackup-team] [Question #112940]: command line control on full - incremental backup
Question #112940 on NSsbackup changed: https://answers.launchpad.net/nssbackup/+question/112940 Jean-Peer Lorenz requested for more information: Just for curiosity: what commands are you using in order to backup these databases? Can you control whether a full or incremental backup is done? -- You received this question notification because you are a member of NSsbackup team, which is an answer contact for NSsbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp
Re: [Nssbackup-team] [Question #112940]: command line control on full - incremental backup
Question #112940 on NSsbackup changed: https://answers.launchpad.net/nssbackup/+question/112940 paolocollector posted a new comment: Not sure how to contribute to the blueprint. I can tell you why I need this. I can't backup directly mysql and subversion databases, so i run a script to backup them to a specific folder, that becomes then part of nssbackup. It would make sense to have a common policy where a full nssbackup is performed when i do a full mysql and svn backup, so i need to control it via script -- You received this question notification because you are a member of NSsbackup team, which is an answer contact for NSsbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp
Re: [Nssbackup-team] [Question #112940]: command line control on full - incremental backup
Question #112940 on NSsbackup changed: https://answers.launchpad.net/nssbackup/+question/112940 Status: Open => Answered Jean-Peer Lorenz proposed the following answer: Hi Paolo, you're right - at the moment a proper commandline interface providing some features/configuration tricks is not implemented. I've already thought about this and something in this direction is included in the current development branch (trunk - not for production!). I've registered a blueprint https://blueprints.launchpad.net/nssbackup/+spec /commandline-interface to track the progress on this feature. You are invited to contribute with ideas and specifications to this blueprint (What is it exactly what you need? What happens in the case of not being able to do an incr. backup? And so on.) HTH, Jean-Peer -- You received this question notification because you are a member of NSsbackup team, which is an answer contact for NSsbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp
[Nssbackup-team] [Question #112940]: command line control on full - incremental backup
New question #112940 on NSsbackup: https://answers.launchpad.net/nssbackup/+question/112940 I need to specify in a script to do a full backup or an incremental backup This does not seem to be possible at the moment: is this a planned feature? It would be useful if you need to perform specific operations before backup that are different in the two cases thanks Paolo -- You received this question notification because you are a member of NSsbackup team, which is an answer contact for NSsbackup. ___ Mailing list: https://launchpad.net/~nssbackup-team Post to : nssbackup-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~nssbackup-team More help : https://help.launchpad.net/ListHelp