thx ...Geosharing
[Backup linux] - Multics
Hello everyone, I want to share my script to save on an FTP server outside our beloved Multics * files already ... as you know, in a computer file if nn 'copied hdd 3 technically does not exist, this means that if the annomalie erase your files to the server or to start we need to reset everything ... we will always have a copy saved!
for this system requires some knowledge of linux 2 independent servers .. FRE host for the backup
1. Just signup free hosting service
(mod's edit: use root hostname, service is free!!!)
2. Install
sudo apt-get install lftp
3. Edit script
FTP_HOST= HOSt
FTP_USER=FTP Username:
FTP_PWD= FTP PWD
Step 2: Move Script to Server & Chmod it
FTP the script to /var/script
PHP Code:
#!/bin/bash
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# Backup Multics Configs script.
# smobile_2004 http://multics.info/forums/
#
# DESCRIPTION: Multics/CCcam dir Backup Script
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
FTP_HOST=******.royalwebhosting.net
FTP_USER=*********xx
FTP_PWD=*********xx
LOCAL_SOURCE_PATH=/var/etc/${1} #param 1 from script for example
REMOTE_DEST_PATH=/home/www
EXCLUDE_FILES_LIST=".svn empty anotherDirectory"
# Construct excludes
for exclude in ${EXCLUDE_FILES_LIST}; do
EXCLUDES="-x ${exclude} ${EXCLUDES}"
done
# -R, --reverse reverse mirror (put files)
# mirror -e
#--delete delete files not present at remote site
lftp ftp://${FTP_USER}:${FTP_PWD}@${FTP_HOST} -e "mirror ${EXCLUDES} -R ${LOCAL_SOURCE_PATH} ${REMOTE_DEST_PATH} ; quit"
4. chmod the Script with this command
Thats it, If you want to test the script, just run it with this command:PHP Code:
chmod 755 /var/script/multicsftp.sh
Step 4: Auto run the Script from crontabPHP Code:
./multicsftp.sh
Just add this line to /etc/crontab
Code:
59 23 * * * root /var/script/multicsftp.sh
These backups have come to my rescue many times..
I hope You like It
thx ...Geosharing
thanks very helpful
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks