Welcome, Guest. Please login or register.
Did you miss your activation email?
Saturday 21 December 2024, 04:42:43 pm

Login with username, password and session length

Visit the Official Endian Reference Manual  HERE
14262 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Development
| |-+  Contribute Your Customisations & Modifications
| | |-+  Scheduled backup script
0 Members and 3 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Scheduled backup script  (Read 41695 times)
oakleeman
Full Member
***
Offline Offline

Posts: 12


« on: Friday 31 August 2007, 02:06:54 pm »

This is a cron script that I'm working on for scheduled backups. I've been using it for daily backups in /etc/cron.daily but just yesterday modified it for weekly and put it in /etc/cron.weekly. I'm still trying to find a way other than rsync to get the backups off the EFW. 


#! /bin/sh

# --settings: includes all settings files
#             uses '/home/httpd/html/backup/include.system' listing, but excludes
#             database dumps listed in '/home/httpd/html/backup/include.dumps'
# --logs:     includes all log files within backups.
#             uses '/home/httpd/html/backup/include.logs' listing, but excludes log
#             archives listed in '/home/httpd/html/backup/include.logarchives'
# --logarchives: includes also (does not exclude) log archives, listed
#                in '/home/httpd/html/backup/include.logarchives'
# --dbdumps:  includes (does not exclude) database dumps listed in
#             '/home/httpd/html/backup/include.dumps'
# --cron:     signalizes that the backup has been created by a cronsscript
# --factory:  creates factory defaults backup which includes only settings
# --message:  puts a message within meta data file
# --gpgkey:   encrypt the backup with the supplied gpg key


#message to store in meta file
MSG="Weekly Backup"

#number of backups to keep
DATE="`date --date='2 week ago' +%Y%m%d`"

#path to backups
BACKUPDIR="/home/httpd/html/backup/"

#create backups
/usr/local/bin/backup-create --settings --logs --logarchives --dbdumps --cron --message="$MSG"

#delete backups
rm -rf $BACKUPDIR\backup-$DATE*
Logged
devorem
Full Member
***
Offline Offline

Posts: 12


« Reply #1 on: Saturday 09 February 2008, 08:05:30 am »

Nice.

Have you been able to develop a script to get the backups off of the EFW? 
Logged
sunblast
Full Member
***
Offline Offline

Posts: 22


« Reply #2 on: Friday 02 May 2008, 12:46:55 am »

What about scp? It's allready installed and can be automated. Best thing you can either pull or push the backups to/from another host. Just create a user and a key set. Then transfer the public key and you should be set.

If you have any question I'm here Wink

Greetings sunblast
Logged
wharfratjoe
Full Member
***
Offline Offline

Posts: 17


« Reply #3 on: Wednesday 16 September 2009, 06:04:05 am »

Try this. Works after I did an upgrade from 2.2RC3 to 2.2 final

http://www.nabble.com/daily-autobackup-to19993528.html
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.078 seconds with 19 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com