Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» Packages» Auto Backup Process
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: Auto Backup Process  (Read 580 times)
0 Members and 1 Guest are viewing this topic.
Tram
Jr. Member
**
Offline Offline

Posts: 54


View Profile
« on: June 15, 2012, 05:51:33 am »

Hi All

I am using the Backup package version 0.1.5 which tarballs and gzips a bunch of directories on my box. Mostly usage stuff.
I need to make the process run every night so that it can then be backed up using rsync to another server.

I know it can be done using a script which tarballs all the files and and a cron job which runs the script. However I'd prefer to keep using the GUI for the backup package to specify the directories which must be backed up.

Also using pfSense 2.0.1 latest release the package does not actually produce the file for downloading once it has created the .gz file.

Any help would be great.

Thanks
Logged
Tram
Jr. Member
**
Offline Offline

Posts: 54


View Profile
« Reply #1 on: July 10, 2012, 02:37:01 am »

So I found the command which the package was using "bsdtar".
I created a small script to generate the backup files and set up a cron job to run the backup every evening.
Finally I set up rsync to create backed up files of the backup file on a separate server.

Backup Script:
Code:
#/bin/bash
cd /home/user/backup
mv -v pfsense_backup.tar.gz pfsense_backup_old.tar.gz
bsdtar -c -z -f /home/user/backup/pfsense_backup.tar.gz /cf/conf /var/db/rrd /usr/local/bandwidthd /var/squid/logs /var/lightsquid/report

Cron Job:
Code:
root  /bin/sh /home/user/pfsense_backup.sh 

Hope this helps someone out  Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.029 seconds with 19 queries.