[NCLUG] I just did a system update
Jesse Griffin
jesse at tummy.com
Mon Oct 15 12:25:57 MDT 2012
Kerry,
I'm still not entirely clear what you are after, but here are some ideas.
To see all the packages installed on your system run:
dpkg -l >pkgslist
or
rpm -qa >pkgslist
Then, if you reinstall your OS, you could use those lists to rebuild the
packages that you want.
Alternately, if you are looking for a full system backup, capable of being used
as a full restore to a new machine or a blank disk you might want to consider
http://clonezilla.org/.
If you prefer the manual way, rsync and/or netcat can be used to perform these
operations. See
http://articles.slicehost.com/2011/2/4/migrating-a-linux-server-from-the-command-line-running-the-sync
for helpful tips.
A potential rsync backup command would be:
rsync --numeric-ids -havP --delete --delete-excluded
--exclude-from=/home/USER/.rsync-excludes /
USER at BACKUPSERVER:/home/Backups/COMPUTERNAME
The rsync-excludes file could include directories like this:
/lib/udev/devices/
pid/
/proc/
/sys/
/dev/
/media/
/home/*/.opera/opcache/
/home/*/.dbus/session-bus/
/home/*/.ccache/
/home/*/.opera/cache/
/home/*/.mozilla/firefox/*/Cache/
/home/*/.cache/chromium/Cache/
/home/*/.macromedia/Flash_Player/#SharedObjects/
/home/*/.dbus/session-bus/
/home/*/.gvfs/
/tmp/orbit-*/
/tmp/keyring-*/
/tmp/gpg-*/
/tmp/.ICE-unix/
/tmp/.X11-unix/
/tmp/.esd-1000/
/tmp/.s.PGSQL.*
/tmp/ksocket-*/
/tmp/pulse-*/
/tmp/ssh-*/
/tmp/rsync.log
/var/spool/postfix/private/
/var/spool/postfix/public/
/var/cache/yum/
/var/cache/yum/
/var/tmp/yum-*-*/
/var/cache/apt/archives/
Then, to perform a restore to a new disk, the easiest way is to do a basic
install of the same OS on the new disk. Then reboot and go into a rescue mode,
probably off of a live CD (CentOS 6 rescue mode is good). Then you can chroot
into the basic OS, start SSH, and perform an rsync from your backup server to
the new disk, something like this:
rsync -ha --numeric-ids --progress --exclude=/proc --exclude=/sys --exclude=/dev
/home/Backups/COMPUTERNAME/ root@$DESTIP:/
After that you probably want to run something like `update-grub` and then
`grub-install /dev/sda`, or whatever your disk name is.
As you can see, that's rather complex and there are some caveats too, depending
on how much the hardware may be changing, but it works well if you know what you
are doing.
If you have another disk in the same machine then it may be easier just to use
dd to copy from one disk to another, but this can be a bit advanced as well.
In short, use clonezilla if you are unsure of how to proceed with the above notes.
Thank you,
Jesse Griffin
tummy.com, ltd.
On 10/15/2012 05:02 AM, Kerry Miller wrote:
> First: I want to make a backup of the Operating system and application
> files after an update. Once I have the back up I would like to rebuild
> the operating system and application list from the back up easily. I
> guess I need to realize the process of doing this. Especially assuming
> a crash of the system disk and haveing to reinstall the boot loader.
>
> Kerry N0WIQ
> My web site URL is:
> http://mywebpages.comcast.net/n0wiq
>
>
> On 10/14/2012 12:06 PM, Ben West wrote:
>> I'm sure I can help, what is it that you're trying to do, exactly?
>>
>> On Sun, Oct 14, 2012 at 12:03 PM, Kerry Miller<n0wiq at comcast.net> wrote:
>>
>>> Hi People,
>>>
>>> I know how I would go about backing up the system and application
>>> files. It seems I should be able to put the backup into a boot-able set
>>> of files. Can some one tell me how to do that.
>>>
>>> --
>>> Kerry N0WIQ
>>> My web site URL is:
>>> http://mywebpages.comcast.net/n0wiq
>>>
>>> _______________________________________________
>>> NCLUG mailing list NCLUG at lists.nclug.org
>>>
>>> To unsubscribe, subscribe, or modify
>>> your settings, go to:
>>> http://lists.nclug.org/mailman/listinfo/nclug
>>>
>> _______________________________________________
>> NCLUG mailing list NCLUG at lists.nclug.org
>>
>> To unsubscribe, subscribe, or modify
>> your settings, go to:
>> http://lists.nclug.org/mailman/listinfo/nclug
>>
> _______________________________________________
> NCLUG mailing list NCLUG at lists.nclug.org
>
> To unsubscribe, subscribe, or modify
> your settings, go to:
> http://lists.nclug.org/mailman/listinfo/nclug
More information about the NCLUG
mailing list