Search

Rss Posts

Rss Comments

Login

 

Posts from January, 2010

IPB 3.x.x text replace in all posts

Jan 26


Run this queries in phpmyadmin to replace text1 to text2 read all »

Secure server backup (ftp + openssh+encode) !

Jan 12

Secure server backup logic
1) find all buckup files *.gz
2) encode them to *.gz.out
3) remove gz file
4) upload to ftp
5) remove encoded file

Secure server backup script

1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
BACKUPDATE=`date +%Y-%m-%d`;
find . -type f -name "*.gz" -print|while read myfile
do
    openssl enc -aes-256-cbc -salt -in "$myfile" -out "$myfile".out -pass pass:PaSSwordThere;
    rm "$myfile" ;
    curl -v -T "$myfile".out ftp://login:"FTppassThere"@ftpserveraddres.com/${BACKUPDATE}/"$myfile" -Q "MKD ${BACKUPDATE}";
   curl -v -T "$myfile".out ftp://login:"FTppassThere"@ftpserveraddres.com/${BACKUPDATE}/"$myfile" ;
    rm "$myfile".out ;
    echo "$myfile" "\n" ;
done

This is my first backup script!

Also decode example
openssl enc -d -aes-256-cbc -in zzzz.gz.out -out zzzz.gz -pass pass:PaSSwordThere;

 
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
27 queries. 0.166 seconds.