Backup files to FTP server Lenovo EMC from CentOS 6.7 application server

Prerequisities:

    CentOS 6.7 – application server, tomcat, Postgres, Java application
    NAS LENOVO EMC – in the same LAN, allows only FTP not SSH by factory defaults
  • yum install curlftpfs
  • CurlFtpFS is a filesystem for accessing FTP hosts. more info More info about curlftpfs

  • Your source directory is /home/djanulik/Documents/zalohy/keo4/
  • curlftpfs ftp://192.168.123.170/Backups/keo4 /mnt/w -o user=username:password
  • This mounts the FTP into local file system under /mnt/w

  • Please note, if you run directly the rsync to dest directory, you will receiver error 95.
    1. Operation not supported (95)

    The FTP does not allow to create temp files. Instead you should create those temp files locally. This is done directly with rsync using –temp-dir=/home/djanulik/Documents/temp/rsync

  • mkdir -p /home/djanulik/Documents/temp/rsync
  • rsync -rav –temp-dir=/home/djanulik/Documents/temp/rsync /home/djanulik/Documents/zalohy/keo4/a0-keo4-cosArch-vac_auto_2016-07-13.csv /mnt/w
    1. More info about RsyncRsync is a fast and extraordinarily file copying tool
  • Finally you can schedule the regular job with cron
  • Posted in News | Leave a comment

    Backup project

    The task was about choosing and configuring appropriate backup techlology for SBS 2011 server.
    1. Synology NAS DS411 Slim.
    2. Switch Cisco with 2GB ports other ports Fastehternet.
    To the first GB port, the server is connected.
    Second GB port is for NAS server synology.

    NAS Synology
    – it provides iSCSI service an alternative to SAN.
    – this solution was chosen ration price/service
    – iSCSI provides SCSI across the LAN and TCP/IP encapsulates SCSI packets.
    – The connected disk is accessible as a local disk in Windows server, without needing to install any drivers.

    The NAS synology consist from 2 hard disks with 450 GB capacity per each.
    This is failover solution if one of the disks is broken.
    First I created a volume. RAID collects several hard disks into one functional topology. This collection of disks is called RAID.
    We use RAID 1, which provides mirroring of data stored on each disk.
    The content is recorded on both disks by RAID 1. If one disk fails, the copy is immediately ready to use.

    Second I had to set up iSCSI LUN. The storage capacity is assigned, if data was physically created.
    This process is controlled by iSCSI LUN at the NAS Synology.

    Finally I configured DiskStation as the iSCSI target and connect it to the Windows server.
    I connect iSCSI target to the LUN unit. Windows server provides easy iSCSI initiator.
    I looked up iSCSI portal using IP address of Synology and default port 3260.
    This iSCSI target is listed in Disk Management. Initialization is a must before the first use.
    At the end I assigned label F: for this volume and after formating the disk appeared in Windows.

    Summary:
    iSCSI LUN assignes dynamically space for stored data. This process is provided by virtualization techlogy.
    Although we use iSCSI for backup, the disk is visible in Windows server as a local disk.
    It can provide more disk capacity for existing server. e.g. storing logs. Windows SBS 2011 server provides built-in backup technology. Each night server performs backup schedule and stores data in NAS.

    Posted in News | Leave a comment

    KEOX uninstall via Windows Command line

    We’ve decided to move our Information system to the new server using windows command line
    1. We need to determine if the services are running. The first service is service used by IS KEOX and the second is MySQL server.

    • C:\>sc query type=service state=running | sc qc keox-nt
    • C:\>sc query type=service state=running | sc qc MySQL
      If you do not know the exact name of a service use this:

    • sc query type= service | find /v “x0” | find /i “MySQL*”
      Well now we’re going to backup database keox into sql file.

    • cd %programfiles%
    • cd MySQL\MySQL Server 5.0\bin\
    • mysqldump –lock-tables –compatible=no_table_options,no_field_options –user=”root” –password=”” -B keox > “C:\keox\backup\keox.sql”
    • Stop service MYSQL
    • sc stop MYSQL
    • Delete the service MYSQL
    • sc delete MYSQL
    • sc stop keox-nt
    • Delete the service keox-nt
    • sc delete keox-nt

    2. To be on a safe side, backup an existing directory contains MySQL.

    • C:\Program Files\7-Zip>7z a -tzip “C:\zalohy\MySQL290911.zip” “c:\Program Files\
      MySQL\*” -r

    2a. And so do for directory keox.

    • C:\Program Files\7-Zip>7z a -tzip “c:\zalohy\keox290911.zip” “c:\keox\*” –r
    • a make an archive
    • -r pack recursively

    3.Delete directory we do not need any more.

    • cd %programfiles%
      If you are not sure whether the directory MySQL is located

    • dir *MySQL*.* /s/a:d
    • /s/a:d searching for directories only
    • del MySQL /S /Q
    • del c:\keox /S /Q
    • /S include subdirectories
    • /Q delete without asking
    Posted in News | 2 Comments

    Installation of the MySQL 5.1 Win7

    You can download the last MySQL server zip file directly from the web page. There are several steps such as1:

    • You should extract the file into the folder e.g. D:\MySQL\server
    • Run Command line and type net user Administrator /Active :yes
    • This enables in-built Account Administrator
    • Next step is to run command line with administrator privilegies
    • runas /noprofile /user:David-PC\Administrator cmd
      Write password for David-PC\Administrator:
    • type cd %programfiles%
    • We need to look for MySQL directory if it is already located in %programfiles%
    • dir “*MySQL*” /s/a:d
    • The last step is to copy MySQL server in the %programfiles% directory
    • xcopy D:\MySQL\server\mysql_server_5.1.50_win32 “Pro
      gram files\MySQL\” /s /e
    • The last step is to edit my.ini with the pspad and set the format as ANSI
    • Finally install the service
    • install the MySQL service “C:\Program Files\MySQL51\server\bin\mysqld” –install MySQL51 –defaults-file=”C:\Program Files\MySQL51 \server\my.ini”
    • Start the service
    • sc start MYSQL51
    • Check if the service is running
    • sc qc MySQL51
    • sc query type=service state=running | sc qc MySQL51
    • sc query type= service | find /v “x0” | find /i “MySQL”
    • Disable Super Administrator account
    • net user Administrator /Active :no
    • log in to MySQL server
    • cd “c:\Program Files\mysql\MySQL Server 5.0\bin”
    • mysql -u root -p
    Posted in News | Leave a comment