Archive for the 'backup' Category

Keep files at Linux/Windows/Unix synchronized with Unison

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

Unison that is available for Linux, Unix and Windows, shares a number of features with tools such as CVS, PRCS, Subversion, BitKeeper, distributed filesystems (e.g. Coda), uni-directional mirroring utilities (such as rsync), and other synchronizers (Intellisync, Reconcile, etc).

This article tells how to sync data between Desktop PC and laptop with Unison.

Share This

Keep contacts and calendar/datebook of Motorola Razr V3 saved

Some time ago I wrote about syncing mobile phone contacts and calendar with online service ZYB. Today I'd like to share my experience of Motorola Razr V3 sync by means of this free service. I'd like to mention that advantage of this method is that it doesn't matter what operating system you use, it can be Linux, Apple Mac or even M$ Window$. All operations are done with any browser you use.

First of all register new account at ZYB or login to existing one at www.zyb.com. After first successful login you'll be suggested to register your mobile phone model with the online system. Just choose your model in a wide phone models list. In my case I choose Motorola Razr V3.

In order to upload your phone contacts to your contacts and calendar/datebok data to ZYB perform the following operations with your Motorola Razr v3:

1. Go to Menu
2. Go to Connection or connectivity
3. Go to Sync
4. Select New entry
5. Name: ZYB
6. Url: http://sync.zyb.com/
7. Username: your ZYB login
8. Password: your ZYB password
9. Select Data Paths, click Change
10. Address book: contacts
11. Dateboook: calendar
12. Press Done to save
13. Select ZYB from the list and click on Select to start syn

When sync is done you'll see your contacts at your personal ZYB page. It’s very comfortable to edit them online and then sync with your Razr V3 by performing 13 step of above operations list.

ZYB provides a feature that allows to sync data between many mobile phones you own. Many phone models are supported, so it would be useful to check if it is supported by ZYB before buying it :)

You may also be interested in:
EV-DO Internet access with Ubuntu Linux
Download and convert YouTube video online and offline
Inimitable wallpapers, icons and themes for Linux

Share This

Make a copy of virtual machine with Vmware Server

It’s proven to be that during software development process, research activities and etc., using of virtulization is invaluable. In my practice I use Vmware Server, so the next article would be useful.

First of all, we need to find where all our virtual machines are in our system. After small search I’ve found vmware files in /var/lib/vmware/Virtual Machines. There are some set of directories each corresponds to some of your already created virtual machines. In my case I was interested in cloning virtual machine with name db1 to new machine db2 and then to db3.

Continue reading about virtual machines cloning with Vmware Server…

Probably you're interested also in:
Vmware Server at Ubuntu Feisty 7.04

Share This

Move linux to another hard drive (dump, restore, backup)

There are several methods to move running Linux to another hard drive at the same server. But I used Unix dump/restore utility to perform this…

First of all it’s necessary to partition new hard drive in the same way as it’s done with old drive (Linux is running at). I usually use 'fdisk' utility. Let’s assume that old drive is /dev/hda and new one is /dev/hdb. To view hda’s partition table please run 'fdisk -l /dev/hda' which should show something like this:

Disk /dev/hda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 15 120456 83 Linux
/dev/hda2 16 276 2096482+ 82 Linux swap
/dev/hda3 277 7297 56396182+ 83 Linux

After this run 'fdisk /dev/hdb' and make the same partitions at it. Interactive mode of fdisk utility is well documented and is very intuitive, so I don't think it would be difficult to perform partitioning.

After this is done, we should make new filesystems at partitions we've created:

mkfs -t ext3 /dev/hdb1
mkfs -t ext3 /dev/hdb3
mkswap /dev/hdb2

When it’s done it’s NECESSARY to mark newly created filesystems as it’s done with old ones. To check filesystem volume name run command 'tune2fs -l /dev/hda1 | grep volume' and etc. You'll see something like this:

Filesystem volume name: /boot

It means that we should mark new hdb1 with label /boot. It can be done by command:

tune2fs -L "/boot" /dev/hdb1

The same should be performed for all partitions except swap one. In my case I should label hdb3 by command:

tune2fs -L "/" /dev/hdb3

At this point new hard drive preparation is finished and we can proceed with moving Linux to it. Mount new filesystem and change directory to it:

mount /dev/hdb1 /mnt/hdb1
cd /mnt/hdb1

When it’s done we can perform moving by command:

dump -0uan -f - /boot | restore -r -f -

And the same with / partition:

mount /dev/hdb3 /mnt/hdb3
cd /mnt/hdb3
dump -0uan -f - / | restore -r -f -

When dump/restore procedures are done we should install boot loader to new HDD. Run 'grub' utility and execute in it’s console:

root (hd1, 0)
setup (hd1)
quit

In case everything is done carefully and right (I've tested this method by myself) you can boot from new hard drive and have 'old' Linux running at new hard drive running.

Good luck!

Share This

Mobile phone contacts, calendar and messages online backup

I'm using different mobile phones and it’s very important for me to keep my contact list as well as calendar entries backed up and to be sure that all this data can be restored in case I've lost my phone or it’s broken or so…

As it usually seems annoying for me to get phone connected to PC via usb cable, bluetooth or etc. I'm using FREE online backup service ZYB.

By means of this service I regularly synchronize my phone data with online storage and in case if phone is lost or broken I restore contacts and etc. to new phone easily.

To get your cell phone data backed up it’s only needed to register at www.zyb.com, choose phone model, get synchronization settings via sms and synchronize data with online backup storage. It took less than 3 minutes to finish when I used it for the first time!

Very nice service and absolutely free (as beer)!

Share This

Moving Linux to remote server (over ssh via third server)

Source: server running rather obsolete Fedora Core 1 with Apache, sendmail, ftp and other stuff.
Target: any Linux server with at least one hard drive of appropriate disk space installed (in this case target server was running Knoppix).
Third server: any ssh running system.

First of all it’s necessary to get all servers to be accessible to each other via ssh. Read your distribution’s manual to find out how to achieve it.

There are several possible ways to move Linux to another server by means of using dump/restore utilities over ssh. I've chosen this one: I've saved source server’s filesystem backup to third server over ssh and then restored this backup to target server (again over ssh).

To do this I've installed dump 0.4b41 onto source server and performed the following commands to save it’s /boot and / filesystems backups to third server (both in one line):

dump -0uan -f - /boot | ssh -c aes256-cbc @ dd of=/home/artemn/backup/dump/dump-boot-l0.bak

and

dump -0uan -f - / | ssh -c aes256-cbc @ dd of=/home/artemn/backup/dump/dump-root-l0.bak

It took several hours to transmit 20Gb over Internet in my case. If you're performing these operations remotely I recommend to use utility screen to be sure that transmitting won't be stopped when ssh session to source server is closed. To use it just login to source server over ssh and type screen and then dump command with necessary agruments (see below). In case you've been disconnected just ssh again and restore screen session by command screen -r.

You can control above mentioned dump command activity by watching file size of dump-root-l0.bak and dump-boot-l0.bak files at third server.

After dump is finished you can check backup at third server by performing restore -i -f dump-root-l0.bak and walking through directories in backup file (use ls command). For further information read restore manual (interactive restore section): man restore.

Then login to target server and partake hard disk in the same way as it’s done at source server. In my case I've created three partitions /dev/sda1 for /boot, /dev/sda2 for / and /dev/sda3 for swap. Target server can be running Live CD like Knoppix and have only one hardware drive.

When partitioning is done create filesystems at every partition:

mkfs -t ext2 /dev/sda1

mkfs -t ext2 /dev/sda2

mkswap /dev/sda3

Then set volume labels to just created filesystems by commands:

tune2fs -L "/boot" /dev/sda1

and

tune2fs -L "/" /dev/sda2

Labels should be the same as at source server (you can see them by executing tune2fs -l /dev/sda1 and tune2fs -l /dev/sda2 at source server). Sometimes it’s also necessary to set up volume label for swap filesystem.

When it’s done mount created filesystems by commands:

mount /dev/sda1 /mnt/sda1

and

mount /dev/sda2 /mnt/sda2

(be sure that /mnt/sda1 and /mnt/sda2 are created).

To restore filesystem from backed up copy, 'cd' to destination directory and restore data by commands:

cd /mnt/sda1

and

ssh @ "cat /home/artemn/backup/dump/dump-boot-l0.bak" | restore -r -f -

then

cd /mnt/sda2

and

ssh @ "cat /home/artemn/backup/dump/dump-root-l0.bak" | restore -r -f -

In case of success /mnt/sda1 and /mnt/sda2 will contain the same files at /boot and / directories at source server.

When filesystems restoration is done we should install boot loader onto hard drive of target sever: start grub console by typing grub and then type root (hd0, 0), then setup (hd0). After this boot loader will be installed and target server can be booted from hard disk.

Note: be sure that dump and restore commands run at source and target servers are of same versions as it causes problems sometimes. I've used 0.4b41 at Fedora Core 1 (source) and Knoppix (target server).

Another note: I've spent a day to solve the problem with kernel panic when booting into target server’s hard disk. The problem was in volume labels. So don't forget to set them.

Hope it helps somebody! Good luck, mates!

Share This



Information Improvisation: Operating system is the backbone for every organization. Having professionals with CISSP certification in organization ensures the life running through its networks. Organizations manage tremendous amounts of traffic due to the use of pc phone and people with 646-058 certifications are ideal for this job. They can also manage online networks which can be hosted on lunarpages, which also provides free email hosting. With the company's logo design every page and a well crafted web template the site can be given a graceful look.