LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2010, 06:20 PM   #1
irie
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Rep: Reputation: 0
How do I get apt-mirror to send me a report?


I have apt-mirror working perfectly for my local repo. I have it sending me an email everyday after it runs. However, there is nothing in the email. I'd like for the email to show me how much data was downloaded, number of files, etc...(the normal apt-mirror information when ran from terminal).
Lastly, the clean.sh script contains nothing to do. What can I add to the script to clean up my repo (remove older packages, etc..) My repo keeps getting larger and larger. It's at 66.7GB now.
 
Old 03-06-2010, 05:33 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,889

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
A quick check of the apt-mirror forum at Sourceforge determined that apt-mirror does not have a verbose mode as yet. You can forget the details in the email until verbose mode is added. You should go to the forum and add your vote to have verbose mode added, including what kind of information you want reported.

I also found that apt-mirror relies on the apt sources.list to determine which files to keep and which to remove. Make sure your sources list is clean and correctly shows which repo(s) you want included in your mirror, then run clean.sh to clean your mirror.
 
Old 03-06-2010, 08:30 PM   #3
irie
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I think I may have figured it out.
1. run this command in gnome-schedule apt-mirror > home/trev/mirror.txt
2. mutt -s "Apt-Mirror Report" myemail@address.com < /home/trev/mirror.txt

Results look like this...

Downloading 84 index files using 20 threads...
Begin time: Sat Mar 6 21:25:59 2010
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Sat Mar 6 21:26:00 2010

Proceed indexes: [SSSSSSSSSPPPPPPPPP]

0.0 bytes will be downloaded into archive.
Downloading 0 archive files using 0 threads...
Begin time: Sat Mar 6 21:26:07 2010
[0]...
End time: Sat Mar 6 21:26:07 2010

0.0 bytes in 0 files and 0 directories can be freed.
Run /media/Repo/var/clean.sh for this purpose.

Running the Post Mirror script ...
(/media/Repo/var/postmirror.sh)

Real test will be tonight to see if it runs automatically.
 
Old 06-26-2010, 07:37 AM   #4
reaxion
LQ Newbie
 
Registered: Nov 2003
Posts: 9

Rep: Reputation: 0
Talking

I set up a full reporting script for apt-mirror. If you'd like a copy of it, let me know and I'll post it here for you. That goes for anyone else too. I even added a portion that detected whether a removable backup drive was attached and if so, it rsync'd the changed data to that drive.
 
Old 09-27-2010, 09:31 AM   #5
reaxion
LQ Newbie
 
Registered: Nov 2003
Posts: 9

Rep: Reputation: 0
Sorry to raise an old thread, but if you find clean.sh is empty of entries to purge, you need to be sure to add in "clean" lines at the bottom of your apt-mirror which correspond to each mirror server (not each repository, just the actual servers), like so:

If your repository lines in mirror.list are like so:
deb http://archive.canonical.com/ubuntu lucid main universe multiverse partner
deb http://packages.medibuntu.org/ lucid free non-free

You'd have "clean" entries at the bottom of the mirror.list file like so:
clean http://archive.canonical.com/ubuntu
clean http://packages.medibuntu.org

Incidentally, bigrigdriver is incorrect about the sources.list. apt-mirror only pays attention to what is in the mirror.list file, not what is in the sources.list.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-mirror doesn't create appropriate mirror ??? abd_bela Debian 1 09-30-2009 04:23 PM
LXer: Create a Local Ubuntu Repository using Apt-Mirror and Apt-Cacher LXer Syndicated Linux News 0 08-04-2009 10:13 PM
LXer: How To Create A Local Debian/Ubuntu Mirror With apt-mirror LXer Syndicated Linux News 0 01-04-2007 05:33 PM
add apt-get mirror johntramp Debian 3 04-22-2004 09:05 AM
apt mirror preference dbkluck Debian 5 10-31-2003 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration