Category / Linux

  • April 10, 2014 - rob

    Backing up MySQL Databases

    #!/bin/bash user=”root” password=”leialou30″ host=”localhost” backup_path=”/backup/mysql” date=$(date +”%d-%b-%Y”) # Get list of databases databases=$(mysql –user=$user –password=$password -e “SHOW DATABASES;” | grep -Ev “(Database|information_schema)”) # Create folder using date mkdir $backup_path/$date # Create dumps for each database for db in $databases do mysqldump –user=$user –password=$password –host=$host $db > $backup_path/$date/$db.sql done

    Read More
  • How to start vnc at boot up to login remotely 1. Install x11vnc sudo apt-get install x11vnc 2. Create the x11vnc.conf file vi /etc/init/x11vnc.conf 3. Add the following lines to the new file: start on login-session-start script /usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -auth /var/run/lightdm/root/:0 -display:0 -forever -bg end script 4. Save the file :wq 5. […]

    Read More