You are not logged in.
So I made my first bash script a few minutes ago and thought I'd share. It creates a list of installed packages then ups 'em to an ftp server. You'll need wput (it's small).
I haven't tried it on #! yet, but it works on my Arch box. Different commands of course, but I think these are the commands to do the same in Ubuntu. Correct me if I'm wrong. 
#!/bin/bash
echo "Creating list of installed packages."
# Change 'user' to your username in the next 2 lines
sudo dpkg --get-selections | grep '[[:space:]]install$' | \awk '{print $1}' > /home/user/pkglist
filedir="/home/user/"
targetfile="pkglist"
host="ftp.yoursite.com/"
user="username"
pass="password"
echo "Uploading to $host."
cd $filedir
wput ftp://$user:$pass@$host/$targetfile
echo "Removing pkglist"
rm pkglist
echo "Done"
# After a fresh install, you can reinstall all packages by wget'n this file and running
# dpkg --set-selections < pkglist
# dselectSave it as ~/pkgup and run it with ./pkgup or, better yet, set it up as a daily cron job. 
Last edited by dannytatom (2009-02-19 08:37:37)
.files
dnyy in IRC & Urban Terror
Offline
Nice script, thank you for sharing! 
Offline
So if I understand correctly, this creates a backup of all of the installed packages and uploads them to an FTP server?
All in an effort to learn...
Delves deeper into code...
Offline
Nah, it just creates a list and uploads the list (http://im.dannytatom.com/pkglist) to an ftp server. It wouldn't be hard to mod it to download all the packages, tar 'em up, then upload that but didn't have much reason to do that.
.files
dnyy in IRC & Urban Terror
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.