Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-04-2010, 07:20 PM   #1
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 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, 06:33 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,903

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
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 to clean your mirror.
Old 03-06-2010, 09:30 PM   #3
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" < /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


0.0 bytes will be downloaded into archive.
Downloading 0 archive files using 0 threads...
Begin time: Sat Mar 6 21:26:07 2010
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/ for this purpose.

Running the Post Mirror script ...

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

Rep: Reputation: 0

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, 10:31 AM   #5
LQ Newbie
Registered: Nov 2003
Posts: 9

Rep: Reputation: 0
Sorry to raise an old thread, but if you find 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 lucid main universe multiverse partner
deb lucid free non-free

You'd have "clean" entries at the bottom of the mirror.list file like so:

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.


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 05:23 PM
LXer: Create a Local Ubuntu Repository using Apt-Mirror and Apt-Cacher LXer Syndicated Linux News 0 08-04-2009 11:13 PM
LXer: How To Create A Local Debian/Ubuntu Mirror With apt-mirror LXer Syndicated Linux News 0 01-04-2007 06:33 PM
add apt-get mirror johntramp Debian 3 04-22-2004 10:05 AM
apt mirror preference dbkluck Debian 5 10-31-2003 01:01 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 PM.

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