Quantcast
Channel: Zenoss Community : Document List - Wiki
Viewing all articles
Browse latest Browse all 11

Simple backup to ftp script

$
0
0

## Note, this is a  fist guide and i know can be enhanced removing hardlink a using variables

 

First of all install "curl", then create a file under /opt/zenoss/backupmyzenoss.sh like this

 

#!/bin/sh
#This is a zenoss backup script that after make a backup it will copy
#on a ftp server and remove source file

/opt/zenoss/bin/zenbackup --save-mysql-access

#sleep 900 if needed

tar czf /tmp/lastbackups.tgz /opt/zenoss/backups/

#sleep 900 if needed

curl -v -u user:password -T /tmp/lastbackups.tgz ftp://ipserverftp/


#sleep 900 if needed
#make a cleanup of old backups


rm -rf /tmp/lastbackups.tgz
rm -rf /opt/zenoss/backups/*.tgz

 

then modify crontab

 

[zenoss@zenoss ~]$ crontab -l

0 0 1 * * /opt/zenoss/backupmyzenoss.sh >> /dev/null


Viewing all articles
Browse latest Browse all 11

Trending Articles