In Bash, with pipe (the "|" symbol) and ssh makes a good combination of server administration tool, securely. Some examples :
Showing posts with label Data Backup. Show all posts
Showing posts with label Data Backup. Show all posts
2011-02-04
2011-01-07
Bash - How to check the exit status of pipe command
Piping in bash commands are common.
Checking exit status of a command in bash scripting is essential.
How about checking exit status of the commands in a pipe?
Example:
2010-06-24
FreeBSD - How to format & partition additional hard disk
While housekeeping the external hard disk laying around, I managed to squeeze out one spare hard disk out of this cleaning practice. The size is big enough to act as a backup media for my FreeBSD server & desktop workstations. The external hard disk partition layout preferred would be 3 partitions. The 1st (backup of OS & data) & 2nd partition (data backup) will be FreeBSD UFS & the 3rd will be FAT32 (for media transfer).
Since my workstation doesn't support FreeBSD UFS file system, I'll partition & format it using the FreeBSD server. All tools involve are command line utilities and can be done through remote secure shell. This post can also be serve as a guide for adding new/used additional hard disk to FreeBSD server.
Here goes :
Since my workstation doesn't support FreeBSD UFS file system, I'll partition & format it using the FreeBSD server. All tools involve are command line utilities and can be done through remote secure shell. This post can also be serve as a guide for adding new/used additional hard disk to FreeBSD server.
Here goes :
2010-01-02
FreeBSD - Backup and restore FreeBSD using Fixit CD
Since FreeSBIE have not been updated since year 2007, its kernel recognizing new hardware starts to worry me as it is based on FreeBSD 6.2 and it is going to reach EoL (end of life) by end of this year, 2010. Is time to experiment on new way restoring backup.
The FreeBSD installation process does mentioned about "Fixit" CD booting. After meddling around with it, it's actually referring to another bootable CD which its label name consits of "livefs" (Live File System). It's also known as "disk 2" prior to FreeBSD 7.
e.g.
Do take note that the dump/restore instruction from the previous post "Freebsd – Backup & restore for disaster recovery" is still valid. This post is served as a "update" as it won't be using FreeSBIE, rather, it will using the livefs to start the restoration of the partition(s).
Without further ado, here's the instruction :
The FreeBSD installation process does mentioned about "Fixit" CD booting. After meddling around with it, it's actually referring to another bootable CD which its label name consits of "livefs" (Live File System). It's also known as "disk 2" prior to FreeBSD 7.
e.g.
Installation disc -- > 8.0-RELEASE-i386-disc1.iso Live File systems disc --> 8.0-RELEASE-i386-livefs.iso
Do take note that the dump/restore instruction from the previous post "Freebsd – Backup & restore for disaster recovery" is still valid. This post is served as a "update" as it won't be using FreeSBIE, rather, it will using the livefs to start the restoration of the partition(s).
Without further ado, here's the instruction :
2009-07-19
Freebsd - How to install FreeBSD as your Desktop
UPDATE : After testing PC-BSD for a while (more then 6 months), PC-BSD indeed is a FreeBSD variant that is superior in Desktop environment. Its user friendly installation and configuration have make FreeBSD so much more suitable running as an Desktop. Unless you're interested in figuring out how to tweak and turn FreeBSD to work in a Desktop, give PC-BSD a try, you'll love it!
Check it out at PC-BSD website !!!
PsyberMonkey is turning his desktop to FreeBSD and this is the work he has done :-
1. FreeBSD quick install guide (aka How to install FreeBSD).
2. make sure hardware are detected properly
3. Using ports to install software - go to Section III.
4. Getting KDE, GNOME and XFCE up and running (how to still in progress)
Other miscellaneous stuff :
This post will be updated periodically to reflect the progress of using FreeBSD as a Desktop.
Adios !!!
Check it out at PC-BSD website !!!
PsyberMonkey is turning his desktop to FreeBSD and this is the work he has done :-
1. FreeBSD quick install guide (aka How to install FreeBSD).
2. make sure hardware are detected properly
- How to install or add sound card driver module
- wireless (how to still in progress)
- ACPI (still having trouble making it work)
- remote control through SSH (how to still in progress)
- all others e.g. external drive formatted in FAT32, display card, track pad, external mouse, gigabit network card & etc are detected and function properly.
3. Using ports to install software - go to Section III.
4. Getting KDE, GNOME and XFCE up and running (how to still in progress)
Other miscellaneous stuff :
- How to disable or turn off the keyboard beep sound
- How to assign or remove fixed IP
- IP address automatically assign aka DHCP
- How to install flash plugin or player to work with FireFox
- Backup & restore for disaster recovery
- How to upgrade the kernel or base system
- Error installing KDE4 or Xine
This post will be updated periodically to reflect the progress of using FreeBSD as a Desktop.
Adios !!!
2009-07-10
FreeBSD - How to upgrade the kernel or base system
The nature of FreeBSD is so rock-solid stable that some system administrator adopt the philosophy "if it ain't broken, don't fix it", others, beg to differ. Upgrading & patching of servers should be diligently carry out so that security vulnerabilities are minimize to the least (who can be sure of their servers are 100% secure ???), introduce to new application features (which geek doesn't like new stuff ???) & performance increase (meaner & leaner :) ). Patching can only be done to a certain level then it will need kernel and base system to compile and build the latest patches or upgrades.
Regular upgrade of the FreeBSD kernel and base system is a good way to follow the support schedule. It would mean that your server would have a longer life span in the production. Not because of some latest OS "GUI" release that demand higher RAM for the "processor hungry monster" lies beneath the OS "GUI" release. But rather, it fixes the bugs of the applications, gives you more new functions and make your hardware works harder & faster.
There are some hiccups to take note of. As with all OS upgrade, the will experience up time interruption (aka server down time) . Scenario such as :
:- The performance of the server have greatly draw by the upgrade process and impact the usual services the server runs. Thus the response time of the server fail to serve the users in time and affected the normal operation of the business.
:- The upgrades break the kernel or base system and the server fail to boot.
:- After the first boot up of the upgrade, the applications fail to compile properly and resulted the services fail to start.
:- The is your first FreeBSD upgrade and you can't predict what would happen and hiccups just like to happen at these times. :p
All of the above can be avoided as long as the below points are observe :
Regular upgrade of the FreeBSD kernel and base system is a good way to follow the support schedule. It would mean that your server would have a longer life span in the production. Not because of some latest OS "GUI" release that demand higher RAM for the "processor hungry monster" lies beneath the OS "GUI" release. But rather, it fixes the bugs of the applications, gives you more new functions and make your hardware works harder & faster.
There are some hiccups to take note of. As with all OS upgrade, the will experience up time interruption (aka server down time) . Scenario such as :
:- The performance of the server have greatly draw by the upgrade process and impact the usual services the server runs. Thus the response time of the server fail to serve the users in time and affected the normal operation of the business.
:- The upgrades break the kernel or base system and the server fail to boot.
:- After the first boot up of the upgrade, the applications fail to compile properly and resulted the services fail to start.
:- The is your first FreeBSD upgrade and you can't predict what would happen and hiccups just like to happen at these times. :p
All of the above can be avoided as long as the below points are observe :
- plan and schedule the upgrade with adequate time so that even hiccups happen, there are ample time to solve it.
- plan a trial server upgrade or mock run of the upgrade to anticipate what hiccups might happen and test the solutions. Use the server backup and restore to another hardware, virtual machine or sandbox to test the server upgrade. Drop down every step and retry it if time permits to minimize the hiccups.
- The is the most important one. Always backup/restore perform a full system backup with no less then 1 day of difference. The shorter time of the difference between the backup and the upgrade, the faster and painless the restore process is. This also mean shorter down time.
2009-07-02
Freebsd - Backup & restore for disaster recovery
Data are all around servers.. To name a few, file server, email server, LDAP server, web server, DNS server and these are just a few essential servers that make up part of IT section of your company. ERP, CRM, financial projection system, database server, accounting & payroll system are the example of business application. Imagine, what if "some" of these data are loss. It is also worth mentioning that data is so valuable to the company, that partial loss of it might lead to breaking your business continuity !!!
Most of the company operation are depending on these data in the server to make decisions. Data in the servers have never been so important.
Server data disaster recovery planing is a vital process in system administration. It directly shows how much the system administrators understand the importance their role in the business. Reason for data loss can be classified into 2 main categories, natural disaster and man made disaster. Natural disaster that causes data loss includes flood, earthquake, fire hazard and etc. Man made disaster (aka PBKC which denodes Problem Between Keyboard and Chair :p ) examples, hacking activities, accidental data deletion or over written and server maintenance e.g. patching, upgrades, developments, moving to a bigger size of hard disk & etc.
Disaster recovery involves planning, backup & restore. Planning will need identify which are the crucial data to backup and how frequent should it be backup. The next consideration will be what media should the data be save to. Generally, external hard disk (e.g USB) or network based storage (e.g. file server, ssh server, NAS, SAN) are the cheapest & fastest way to store the data. But if the data is to archive, it should go into media e.g. tape, CD, DVD and other optical media. Lastly, all planning and backup of the data should always test against restoration, or else why even plan to save it. :)
This post will concentrate on how to prepare for Server disaster recovery on a FreeBSD server. Do take note Database backup is not cover in this post as Database backup itself, have already a few strategy to look on.
Most of the company operation are depending on these data in the server to make decisions. Data in the servers have never been so important.
Server data disaster recovery planing is a vital process in system administration. It directly shows how much the system administrators understand the importance their role in the business. Reason for data loss can be classified into 2 main categories, natural disaster and man made disaster. Natural disaster that causes data loss includes flood, earthquake, fire hazard and etc. Man made disaster (aka PBKC which denodes Problem Between Keyboard and Chair :p ) examples, hacking activities, accidental data deletion or over written and server maintenance e.g. patching, upgrades, developments, moving to a bigger size of hard disk & etc.
Disaster recovery involves planning, backup & restore. Planning will need identify which are the crucial data to backup and how frequent should it be backup. The next consideration will be what media should the data be save to. Generally, external hard disk (e.g USB) or network based storage (e.g. file server, ssh server, NAS, SAN) are the cheapest & fastest way to store the data. But if the data is to archive, it should go into media e.g. tape, CD, DVD and other optical media. Lastly, all planning and backup of the data should always test against restoration, or else why even plan to save it. :)
This post will concentrate on how to prepare for Server disaster recovery on a FreeBSD server. Do take note Database backup is not cover in this post as Database backup itself, have already a few strategy to look on.
There is an update for this post, please check out the updated post "FreeBSD – Backup and restore FreeBSD using Fixit CD".
Subscribe to:
Posts (Atom)


