Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

Backup the Complete VPS as an .iso including system files

Backup the Complete VPS as an .iso including system files

fresher_06fresher_06 Member
edited August 2012 in Help

Hi Everybody,

I just want to take the complete backup of my whole VPS including the system files (Not just DB and websites) everything. Want to change it into an .iso file so that i can boot it up on my laptop as well and then later on any changes made to this should be persistent. The reason for this is that I have installed many things on VPS with hell lot of different configuration and just don't want to loses anything in case something worst happened. Any clue??

Comments

  • InfinityInfinity Retired Staff

    First of all what Virtualization type are you using?

    我是一个巨魔 (;

  • fresher_06fresher_06 Member
    edited August 2012

    @Infinity .. i am using 123systems.net VPS .. i think its OpenVZ .. co i have burstable RAM..

  • Look into debsums or similar to find changed files from the default install, that is if you have debian/ubuntu. Then you can debootstrap to some directory, apply your fixes and put it on your CD (i recommend USB stick instead)

  • Sometime ago, Randy want to do this. Maybe you could ask him?

    My blog | Server Uptime | I'm not working for any providers in here, all my comments just my own opinion.image
  • i tried using Webmin .. filesystem backup .. but it got stuck in /proc directory and was keep on looping in /proc directory only .. for booting though an .iso file .. do we need a /proc .. if yes then can I put some default file there.. I am using Debian Lenny

  • earlearl Member
    edited August 2012

    Can you ask them to enable quick backup in solusvm? I think that creates a complete backup of your VPS that you can download..

  • GaryGary Member

    @ErawanArifNugroho said: Sometime ago, Randy want to do this. Maybe you could ask him?

    Not sure I'd take advice from Randy on anything...

    Thanked by 1netomx
  • If you installed things through the package manager, you can get a list with something like dpkg -l (for debian/ubuntu/etc). Dunno the command for centos. More of a direct response to your question, there's not really an easy way to turn it into an iso. You can however maybe get a .tar.gz or etc from your host if you ask nicely.

    Looking for support, sysadmin, etc. work: PM
    Working on VPSM
  • @DimeCadmium .. its not just about the installed packages .. that can be easily known from dpkg -l .. its more about their corresponding configuration files .. I have this VPS for more than a year and I have really played with it by installing really useful stuff from my work prospective .. but don't have a log as in what all configuration changes i have done over the period of this year .. so I am just worried in case .. i lost my OS.. or something goes wrong ..

  • fresher_06fresher_06 Member
    edited August 2012

    rsync -avz -e 'ssh -p 22022' / user@domain:/path/to/folder/ -- will this take backup of the whole '/' folder ...

  • I can't remember where it was... but I saw something not long ago that you can run on your system to find every change you have ever made.

    BitAccel - OpenVZ VPS / IRC,VPN,Anything Legal & Unrivaled Support!
  • BitAccel - OpenVZ VPS / IRC,VPN,Anything Legal & Unrivaled Support!
  • What is the sense to create complete copy? Make backup copies /etc, /var/www and DB, may be something else... Or switch to another provider with included backups, lfcvps for example...

  • @Inglar

    @fresher_06 said: its not just about the installed packages .. that can be easily known from dpkg -l .. its more about their corresponding configuration files

    BitAccel - OpenVZ VPS / IRC,VPN,Anything Legal & Unrivaled Support!
  • @Corey said: its more about their corresponding configuration files

    So where all this dozens of configs located, randomly on the entire VPS? :)

  • @Inglar .. yes .. for the programs which I have compiled manually ..most of its files are located in /usr/local .. and for rest of the apt-get installed programs .. files are in /etc -- the config ones ..

    if we can't create an iso can we create tar.gz file of the root .. and than later on using this untar and unzip this filesystem on any USB stick and make it bootable..

  • flyfly Member

    dd if=/dev/sda1 | ssh user@remote " of=/dev/sda1 "

    but yeah if you're openvz, have your provider do a vzdump or some shiz

  • DimeCadmiumDimeCadmium Member
    edited August 2012

    @fresher_06 the best thing to do is probably make a .tar.gz like

    tar -xzf /root/backup.tgz /etc /var /usr /home ...

    Just don't include /proc /dev /tmp

    That is, of course, if your provider won't do it for you.

    Looking for support, sysadmin, etc. work: PM
    Working on VPSM
  • rsync.

    This signature is brought to you by the NSA. Spying on the entire world since 1952!

  • vedranvedran Moderator

    @fresher_06 said: Want to change it into an .iso file so that i can boot it up on my laptop

    How are you going to boot OpenVZ iso on your laptop? Where is your kernel?

    Thanked by 1Randy
  • @vedran .thats the thing..can we we use any generic kernel to boot my tarred file which excludes /proc /dev and /tmp .. or do we need the same kenel as well?

  • Still haven't got any answer yet , My VPS provider said that he can create the complete tar.gz image of my VPS , but not sure how I will be able to boot it by copying that into a ext3 formatted USB drive. Any pointers??

  • Doesnt answer your boot from iso question but have you considered Installing a centos virtual machine on your laptop...install openvz... and restore your backup in a freshly defined container?

    "Go cheap on rarely used things"

  • @fresher_06 said: but not sure how I will be able to boot it by copying that into a ext3 formatted USB drive

    You might first want to read, what exactly OpenVZ -- and virtualisation in general -- is.

    La parole nous a été donnée pour déguiser notre pensée.

  • @fresher_06 said: but not sure how I will be able to boot it by copying that into a ext3 formatted USB drive.

    Just an idea, but perhaps:

    -Install the same OS to the USB drive. -Unpack the .tar.gz to a temporary directory -cp -R /tmp/files/* /usbdrive/, clobbering everything. You'll possibly end up with a bootable USB drive that has all the files from the .tar.gz.

    I am no longer affiliated with IPXcore.
  • Have you tried remastersys?

  • rm -rf / does the trick

    Referral links: DigitalOcean referral link | Get 500MB free with Dropbox | I sell domains with Google Apps, $1 p/ user
  • There's no reason to do an .iso for this. Just get a backup server somewhere and use rsync to copy over /home /var /etc and make database dumps and put them in a folder to rsync as well. Run this rsync once a day, hour, whatever you want.

    The on the backup server, make a tar every day named by the date, deleting files named more than 3 days ago.

    Automate the whole thing and you're set. That we you have all your files, databases, configs as they were for the past 3 days. Or however long you want the retention to be.

    I love bacon. That is all.

Sign In or Register to comment.