Impressive description. Just a note to this: This kind of backup called off-line backup, best work when the web server and the database is not running. An on-line backup is usually hard to do and involves database operations. BTW: I tend to backup the VM images itself with the "safe state" snapshots, I did not have too much problem with that, you might want to try. Oh, and one more advise: Once you decide how to do the backup, simulate a disaster and try to recover from that -- better to do it and correct the backup system before the real disaster happens... Tamas On 24 July 2012 23:45, Darron Black wrote: > If everything is on one filesystem, you can probably do something like: > > sudo tar --exclude=3Dfullbackup.tar.gz --one-file-system cjf > fullbackup.tar.gz / > > Other options that look interesting for using tar: --atime-preserve, > --numeric-owner, --same-order > > Restoring is usually easy, but in your case perhaps not. > > Is it possible with this remote VM access to boot from a ISO image? If > so, it gets easier: > > 1) boot to an Ubuntu 12.04 server CD (64bit if your backed up system is > 64bit, 32bit otherwise) > 2) set up partitions on the main filesystem drive using fdisk or the GUI > tool (set the bootable flag) > 3) format the partition using mkfs.ext4 (or whatever) > 4) mount the main filesystem somewhere like /mnt > 5) ssh/scp/sftp the backup archive file to the mounted filesystem > 6) untar the archive file to /mnt (using sudo tar xjf ...) > 7) you MAY need to edit /mnt/etc/fstab and change drive UUIDs if these > have changed (new drive / virtual drive, check what you have with ls -l > /dev/disk/by-uuid) > 8) now, you need to get grub back on the drive. These details are a bit > fuzzy: > a) mount needed stuff for a valid chroot environment into root: > 1) mount -t proc proc /mnt/proc > 2) mount -t sysfs sysfs /mnt/sys > 3) mount -t devtmpfs udev /mnt/dev > b) change root to the mounted filesystem (sudo chroot /mnt) > c) install grub (grub-install /dev/sda, maybe update-grub instead) > 9) reboot into the rebuilt filesystem! > > If it's possible to create a secondary virtual filesystem drive, then > instead of using the ISO you can boot from one of their prepared Linux > images on a temporary drive, and do more or less the same steps into > your original drive. Then, you'd drop the temporary drive and run with > the recovered drive. > > Just as a note, I semi-regularly do the steps in 8 to recover unbootable > linux systems. I seem to do that to myself a few times a year. I use > VMWare's hypervisor on a server and VMWare Workstation on my laptop with > a crazy number of VMs for one person. My usual backup mechanism is > bacula + gpg + scp to a remote system... but bacula is a pain to > configure, admin, and especially restore. > > > Darron Black > > > On 07/24/2012 10:49 PM, V G wrote: > > Forgot to specify: > > > > - I don't have physical access to the server, only "serial" console > access, > > the ability to reinstall an OS on demand, and then whatever that entail= s > > (SSH, etc.). > > - The backup should be _useful_, which means that I should be able to > > easily restore it by somehow dumping it over a freshly installed OS > > filesystem. But is this even possible? Normally, one would take the dis= ks > > offline and do a offline restore, but this is not an option for me as f= ar > > as I know. I need an OS (like a freshly installed OS) present to actual= ly > > access the filesystem (as far as I know). And while the fresh OS is sti= ll > > running, I need to be able to restore my backup on top of it. The idea = is > > to avoid hand-picking configuration files and so on to backup, and then > > individually restoring them and individually restoring all my packages > and > > settings. I'd like to simply take a snapshot and be able to restore it > > quickly if I need to. > > > > On Tue, Jul 24, 2012 at 11:44 PM, V G wrote: > > > >> Hi all, > >> > >> I bought a very nice VPS hosting package running Xen virtualization fo= r > >> my websites. I'm running Ubuntu 12.04 LTS (the latest) on it, headless= .. > I > >> have access to the SolusVM control panel to boot/reboot/halt the > server, as > >> well as reinstall one of their predefined operating systems on demand = if > >> necessary, but overwriting the current filesystem. I configured my > system > >> just the way I'd like, and I don't want to lose it. This includes > >> configuration files, users, packages, repositories, source code, kerne= l > >> modules - customizations all over the place. > >> > >> What's the _best_ way to do a FULL filesystem backup, that can be easi= ly > >> restored if necessary? I'm using about 1.5/15GB on its current hard > drive, > >> so size is not much by any means. Is it considered good practice to do > >> something like a "tar cjf / /fullbackup.tar.bz2"? More specifically, i= s > it > >> okay to create a tar backup file _within_ the file system that I want = to > >> back up (since fullbackup.tar.bz2 is technically under / (slash))? > >> > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .