Does anyone know of any open source drive image software for linux (Ubuntu), preferably available from the repositories?
Thanks![]()
Does anyone know of any open source drive image software for linux (Ubuntu), preferably available from the repositories?
Thanks![]()
Does it have to be for Ubuntu specifically?
PING - http://ping.windowsdream.com/ping.html
watercooled (11-06-2009)
Erm... dd would do it, but I'm guessing you're looking for something a little more user friendly? Try Partimage
watercooled (11-06-2009)
the dd command is a standard linux app that will image one disk to another.
In its simplest form it is dd if=/dev/source_disk of=/dev/destination_disk
Run it from a terminal as root...Dead easy - and what is really good is that you can run it from a live CD so it isn't operating on mounted file systems, so you do get a true bit by bit image.
(\__/)
(='.'=)
(")_(")
![]()
Been helped or just 'Like' a post? Use the Thanks button!
My broadband speed - 750 Meganibbles/minute
watercooled (11-06-2009)
Thanks for the replies. Sorry I should have stated I wanted to backup, not copy a drive (AKAIK dd is copy only). I'll look into partimage/ping though - they look ideal.
Tar, Mondorescue (bit more than backup - creates a bootable image)), rsync, dump (only works on ext3/ext2 file systems)....
(\__/)
(='.'=)
(")_(")
![]()
Been helped or just 'Like' a post? Use the Thanks button!
My broadband speed - 750 Meganibbles/minute
watercooled (11-06-2009)
Huh? dd can output to a file instead of a disk node, since they too, are a file as well, in fact. dd if=/dev/sda of=~/Backups/20090611.bak is just as valid as dd if=/dev/sda of=/dev/sdb. You can also pipe dd through other programmes like lzma, bzip, gzip, etc, to compress on the fly.
watercooled (11-06-2009)
Sorry, I'm still fairly new to linux - I currently only use it occasionally and I'm still thinking in Windows terms for a lot of things. Seems there are a lot of solutions then...
QFT!
And that is what can put noobies off - there is so much choice - even to the GUI! There often is no best way to do something, there may be several, and what is the best for one situation may not be quite so good (but still viable) in another.
A google search using terms like Linux backup applications will bring up some commercial solutions, but mostly the ones that have been quoted here. Few of them will have graphical front ends (although tar has one in the form of file roller) and again the command line with all the options can be a little daunting initially, but the are fast and efficient.
(\__/)
(='.'=)
(")_(")
![]()
Been helped or just 'Like' a post? Use the Thanks button!
My broadband speed - 750 Meganibbles/minute
Yup, rsync is another file based solution for backups, then you can use version control systems like subversion, git, rcs, etc, on text files which, for all intensive purposes serve as a backup mechanism, particularly if the changes are pushed to a NAS box or a server.
personally I use dump, and then string that with RSH (rremote shell) so that I dump the file system on one machine over a secure lan connection to (in my case) a tape drive on another - but the target device could just as easily be an external disk drive on the host machine, or on the remote one.
Similarly I have used rsync to copy files and directories (via ssh) to another machine, and that gives a replica of the files - I could run it through tar and get a single compressed archive (similar to winzip).
A couple of examples:
rsync -av share/ 192.168.1.9:/home/share
This moves the contents of the directory /home/share (I was in home at the time) to /home/share on remote machine 192.168.1.9. The -av options mean archive mode and verbose (so I could check what was happening) Archive mode preserves all permissions, ownership and timestamps. read the rsync manual (man rsync in a terminal window for details - but basically only replaces files that don't already exist)
RSH=/usr/bin/ssh /sbin/rdump -0ua -Q /root/varback_07_apr_09 -L varback_07_apr_09 -b 1024 -f 192.168.1.3:/dev/tape /varback
This uses a remote shell RSH call to call the SSH (secure shell) application to use rdump to do a dump of /varback to a tape device on remote machine 192.168.1.3. The data is encrypted so the emote machine could be elsewhere on the internet, rather than just on my local lan. (I could use the same mechanism with rsync)
The options are -0ua means a level 0 backup (full) preserving the file attributes. _Q means an inex file and it's location (not essential) and -L is a label. -b is the block size (I set that for my tape drive - but you could leave it as the efault) and -f means the destination device (could be a hard drive or even one big file). The last parameter /varback is the file system to be backed up.
In this case /varback is a mount point and I use LVM to take a snapshot of the /var system because I am using a database. Backing up live databases can be iffy because you don't know what transactions are taking place. However it could just as easily have been /var or /home.
Again man dump and man restore will give you the details - don't be put off by the complexity of the options.
Last edited by peterb; 12-06-2009 at 10:00 AM.
(\__/)
(='.'=)
(")_(")
![]()
Been helped or just 'Like' a post? Use the Thanks button!
My broadband speed - 750 Meganibbles/minute
Sorry, I just need a little more help with pipelining - say I wanted to backup sda1 to a file called backup.bak on sdb1. What command could I use, I guess it could start withbut what would I need for the tar part (I've not used tar CLI beforebb if=/dev/sda1 |)?
Thanks
You need the tar command, not dd. dd is really a block copy device more suited to hard drive operations below the level of the file system.
tar --create --gzip --verbose --file=MyArchive Source_file
will Create a gzip file with a full file listing on the screen called MyArchive from a Source file (or source files)
Abbreviated
tar -cjf foo.tar.bz2 bar/
create bzipped tar archive of the contents of directory bar called
foo.tar.bz2 (the trailing slash means contents of)
j means bzipped, a better compression algorithm
but again, if you type man tar or info tar at a command line prompt, you will get all the information you need
the syntax of the command is
tar [option] [destination_archive_file] [source_file(s) or directory]
But personally, for backup, I would use dump, as I described in my earlier post - but you probably wouldn't need the remote function that I use.
(\__/)
(='.'=)
(")_(")
![]()
Been helped or just 'Like' a post? Use the Thanks button!
My broadband speed - 750 Meganibbles/minute
Remember, there's a big problem with using tar to backup /, namely, it'll try to backup your other backups (but it is smart enough not to backup itself), as well as virtual files like in /dev /sys and /proc, which you don't want at all. Ideally you should mount the partition to be backed up to /mnt or some other place your distro uses, and run tar -cjf /path/to/backup/to/foo.tar.bz2 /mnt/*
You can also use lzma (the default encryption method used by 7zip) with tar --lzma -cf /path/to/backup/to/foo.tar.lzma /mnt/*. Which should save a bit more space.
Ah yes, while we're on the subject of dd, you can use it for backing up, but it will back up the entire partition, block for block, whether the blocks are in use or not, for e.g. I can use dd to do a partition copy of /dev/sda1, a 128M partition, coincidently it's my /boot directory, but despite that partition only being 6mb filled, the dd copy, after pressing it through lzma compression, the file created is 32mb in size, because there's lots of old 'random' 1's and 0's left behind from old filesystem data.
Thanks again for the help!
There are currently 1 users browsing this thread. (0 members and 1 guests)