You are not logged in.
Pages: 1
I've crashed my computer many times now, due to my stupidity. Each time, I have lost files. I guess it's time for me to get a backup system going... sigh...
I've been thinking... What directories are vital to backup? Here are the main two:
/etc
/home
Is there a way to generate a text file of all installed packages on the system? That way, you could have a backup system like this:
Backup /etc
Backup /home
Backup Package List
Then your restore could be like this:
Restore /etc
Restore /home
Read all packages from list and reinstall them
Would you be good to go from there? Would backing up and restoring be THAT easy?
What are your thoughts on this method? Is it possible through pacman?
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Also: /root would need to be backed up...
But what about var?
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
try something like this:
ls /var/lib/pacman/local | sed -e "s/-[0-9.]+-[0-9]+//g" > installed-pkgs.list
it might not be perfect, my regexp may be off... but basically I want to take the entire ls output, and strip off the pkgver and pkgrel at the end...
the format is as follows:
my-package-name-0.1.2.3.4.5-3
transforms to:
my-package-name
edit:
then to reinstall:
for PKG in `cat installed-pkgs.list`; do pacman -S $PKG; done
this, once again, may not be the best of command snippets, but its a starting place
Offline
Also: /root would need to be backed up...
But what about var?
bah don't back up /root - do you really make custom configs for root? I always su, then exit after doing my stuff, so the biggest thing changed in /root is bash_history stuff.
/var is made for things which change alot... nothing is every installed to var and you can actually safely rm -rf /var/* on a live system.... /var is used for things like printer spools, log files, tmp files, cache, and other things....
you may want to back up /var/logs/* just to see what happened before the system borked...
also, you could always backup /var/cache/pacman if you're trying to keep a stable system - this way you get all the pkg files as they were last installed on the system... assuming, of course, that none failed and you didnt recently do a cache clean
Offline
You could use this not YET released script to determine the ALL files that need to be moved onto a new computer... + some extra lines (see above) to get the installed packages list.
:: / my web presence
Offline
bah, i'm getting there when i get a chance - recently distracted with World of Warcraft
Offline
bah, i'm getting there when i get a chance - recently distracted with World of Warcraft
Err.. That was only a shortcut, to skip over some of the above stepts (which should suffice under normal conditions) - I have to admit that this script stays active in my memory as I personally see it as the other half (complement) of pacman that would make it close to perfect (pacman is perfect now too, but on another scale).
:: / my web presence
Offline
pacman is perfect now too.
No its not. I said so once too, but Sarah31 corrected me.
Dusty
Offline
IceRAM wrote:pacman is perfect now too.
No its not.
You're taking words out of their context!
I didn't put period after "too", there's also ",but on another scale" there.
:: / my web presence
Offline
/var is made for things which change alot... nothing is every installed to var and you can actually safely rm -rf /var/* on a live system.... /var is used for things like printer spools, log files, tmp files, cache, and other things....
If you didn't mind losing your mail spool file (/var/spool/mail/<username>), mysql databases (/var/lib/mysql), pacman db (/var/lib/pacman), etc...
/var is used for system specific data files. It will never be mounted over nfs and so anything in there will be specific to that host. Doesn't mean that important stuff isn't stored in there.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
Pages: 1