Editing
Routine Maintenance
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Free up space on backup1 == backup1 is our primary customer backup system. As usage grows over time, it needs to be regularly purged of old files. The easiest way to do this is by removing deprecated files. These mostly consist of cancelled customers or temporary dump/storage files (created during dump/restores). Our standard policy is to hang onto cancelled customers for 6mos after which we remove their files (as far as customers know their data is purged immediately, but we hang onto it just in case.. and in some cases we cancel a server due to non payment so this makes it easy to restore their system). To find files to remove: <pre>[root@backup1 ~]# cd /data/deprecated/ [root@backup1 /data/deprecated]# ls 2101-migrated-20120317.tgz old-683-cxld-20121021.tgz 69.55.230.2-wwwbackup old-744-cxld-20120708.tgz 991-DONTDELETE.tgz old-809-cxld-20120609.tgz archive-col02050-mdfile-cxld-20120409.gz old-854-cxld-20120621.tgz col01371.tgz old-931-cxld-20060513.tgz deleteme_ubuntu-10.10-x86_20111205 old-col00123-mdfile-noarchive-20120417.gz jail10_old old-col00147-vnfile-cxld-20120828.gz jail14_rsync_old old-col00419-dump-cxld-20120224.gz jail15_old old-col01098-vnfile-cxld-20120827.gz jail3_old old-col01278-dump-cxld-20120822 jail4_old old-col01517-dump-cxld-20120828 jail5_old old-col01669-dump-cxld-20120203.gz old-1009-cxld-20120608.tgz old-col01687-dump-cxld-20120909 old-1012-cxld-20120411.tgz old-col01790-dump-cxld-20120828 old-1052-cxld-20120721.tgz old-col01812-dump-cxld-20120820 old-10631-cxld-20120622.tgz old-col01938-mdfile-cxld-20120619.gz old-10632-cxld-20120622.tgz old-col02095-mdfile-noarchive-20120523.gz old-10633-cxld-20120622.tgz olddebian-3.0-v15-20110610.tgz old-1236-cxld-20120621.tgz oldmod_frontpage-deb30-v15-20110610.tgz old-1381-cxld-20120404.tgz oldmod_perl-deb30-v15-20110610.tgz old-1422-cxld-20120721.tgz oldmod_ssl-deb30-v15-20110610.tgz old-14681-cxld-20120619.tgz oldmysql-deb30-v15-20110610.tgz old-1544-cxld-20120626.tgz oldproftpd-deb30-v15-20110610.tgz old-18351-cxld-20120605.tgz old_virt14 old-1853-cxld-20120910.tgz old_virt18 old-1963-cxld-20120206.tgz oldwebmin-deb30-v15-20110610.tgz old-1967-cxld-20120605.tgz suse.virt11.20120421.tgz old-1981-noarchive-20120729.tgz virt11 old-2030-migrated-noarchive-20120727.tgz virt12_old old-2037-cxld-20120716.tgz virt13_old old-2065-cxld-20120727.tgz virt16_old old-2068-cxld-20120424.tgz virt4_old old-2085-cxld-20120531.tgz virt5_old old-364-cxld-20120904.tgz virt6_old old-446-cxld-20120512.tgz virt7_old old-613-cxld-20120601.tgz virt8_old [root@backup1 /data/deprecated]# </pre> virtX_old and jailX_old are permanently archived, so ignore those as well as anything else marked not to delete or otherwise suspicious. Likewise, probably a good idea to try to hang onto oldTEMPLATE.gz as long as we can as well. Most of the stuff we want to delete is dated when it was deprecated, making this easy. So to remove files from 6 mos ago (running this in Oct): <pre>[root@backup1 /data/deprecated]# ls old*201204* old-1012-cxld-20120411.tgz old-2068-cxld-20120424.tgz old-1381-cxld-20120404.tgz old-col00123-mdfile-noarchive-20120417.gz [root@backup1 /data/deprecated]# rm old*201204* </pre> Every few months you will also want to remove some of the snapshot archives for mail. We typically save the 1st, 10th, and 20th of each month. To do this you set aside the dates you want to save then remove months at a time, followed by restoring the set aside dates. Here's how that works: <pre>[root@backup1 /data/www/daily]# ls 05 08-10-11 10-04-10 11-10-10 12-07-29 12-09-21 12-11-14 06 08-10-21 10-04-20 11-10-20 12-07-30 12-09-22 12-11-15 06-06-01-usr-home.tgz 08-11-01 10-05-01 11-11-01 12-07-31 12-09-23 12-11-16 06-07-01-usr-home.tgz 08-11-10 10-05-11 11-11-10 12-08-01 12-09-24 12-11-17 06-08-01-usr-home.tgz 08-11-20 10-05-20 11-11-20 12-08-02 12-09-25 12-11-18 06-09-01-usr-home.tgz 08-12-01 10-06-01 11-12-01 12-08-03 12-09-26 12-11-19 06-11-10 08-12-10 10-06-10 11-12-10 12-08-04 12-09-27 12-11-20 06-12-21 08-12-20 10-06-20 11-12-20 12-08-05 12-09-28 12-11-21 07-01-10 09-01-01 10-07-01 12-01-01 12-08-06 12-09-29 12-11-22 07-01-20 09-01-10 10-07-10 12-01-10 12-08-07 12-09-30 12-11-23 07-02-10 09-01-20 10-07-20 12-01-20 12-08-08 12-10-01 12-11-24 07-02-20 09-02-01 10-08-01 12-02-01 12-08-09 12-10-02 12-11-25 07-03-01 09-02-10 10-08-10 12-02-10 12-08-10 12-10-03 12-11-26 07-03-20 09-02-20 10-08-20 12-02-20 12-08-11 12-10-04 12-11-27 07-04-01 09-03-01 10-09-01 12-03-01 12-08-12 12-10-05 12-11-28 07-04-10 09-03-10 10-09-10 12-03-10 12-08-13 12-10-06 12-11-29 07-04-20 09-03-20 10-09-20 12-03-20 12-08-14 12-10-07 12-11-30 07-05-01 09-04-01 10-10-01 12-04-01 12-08-15 12-10-08 12-12-01 07-05-10 09-04-10 10-10-10 12-04-10 12-08-16 12-10-09 12-12-02 07-05-20 09-04-20 10-10-20 12-04-20 12-08-17 12-10-10 12-12-03 07-06-01 09-05-01 10-11-01 12-05-01 12-08-18 12-10-11 12-12-04 07-06-10 09-05-10 10-11-10 12-05-10 12-08-19 12-10-12 12-12-05 07-06-20 09-05-20 10-11-20 12-05-20 12-08-20 12-10-13 12-12-06 07-07-20 09-06-01 10-12-01 12-06-01 12-08-21 12-10-14 12-12-07 07-08-10 09-06-10 10-12-10 12-06-10 12-08-22 12-10-15 12-12-08 07-08-20 09-06-20 10-12-20 12-06-20 12-08-23 12-10-16 12-12-09 07-09-01 09-07-01 11-01-01 12-07-01 12-08-24 12-10-17 12-12-10 07-10-01 09-07-10 11-01-10 12-07-02 12-08-25 12-10-18 12-12-11 07-10-10 09-07-20 11-01-21 12-07-03 12-08-26 12-10-19 12-12-12 07-10-20 09-08-01 11-02-01 12-07-04 12-08-27 12-10-20 12-12-13 07-12-01 09-08-10 11-02-10 12-07-05 12-08-28 12-10-21 12-12-14 07-12-10 09-08-20 11-02-20 12-07-06 12-08-29 12-10-22 12-12-15 08-01-01 09-09-01 11-03-01 12-07-07 12-08-30 12-10-23 12-12-16 08-01-20 09-09-10 11-03-10 12-07-08 12-08-31 12-10-24 12-12-17 08-02-20 09-09-20 11-03-20 12-07-09 12-09-01 12-10-25 12-12-18 08-03-01 09-10-01 11-04-01 12-07-10 12-09-02 12-10-26 12-12-19 08-03-10 09-10-10 11-04-10 12-07-11 12-09-03 12-10-27 12-12-20 08-03-20 09-10-20 11-04-20 12-07-12 12-09-04 12-10-28 12-12-21 08-04-01 09-11-01 11-05-01 12-07-13 12-09-05 12-10-29 12-12-22 08-04-20 09-11-10 11-05-10 12-07-14 12-09-06 12-10-30 12-12-23 08-05-01 09-11-20 11-05-20 12-07-15 12-09-07 12-10-31 12-12-24 08-05-10 09-12-01 11-06-01 12-07-16 12-09-08 12-11-01 12-12-25 08-06-10 09-12-10 11-06-10 12-07-17 12-09-09 12-11-02 12-12-26 08-06-20 09-12-20 11-06-20 12-07-18 12-09-10 12-11-03 12-12-27 08-07-02 10-01-01 11-07-01 12-07-19 12-09-11 12-11-04 12-12-28 08-07-10 10-01-10 11-07-10 12-07-20 12-09-12 12-11-05 2008-10-23 08-07-20 10-01-20 11-07-20 12-07-21 12-09-13 12-11-06 bb.tgz 08-08-01 10-02-01 11-08-01 12-07-22 12-09-14 12-11-07 boot 08-08-10 10-02-10 11-08-10 12-07-23 12-09-15 12-11-08 current 08-08-21 10-02-20 11-08-20 12-07-24 12-09-16 12-11-09 hold 08-09-01 10-03-01 11-09-01 12-07-25 12-09-17 12-11-10 08-09-10 10-03-10 11-09-10 12-07-26 12-09-18 12-11-11 08-09-21 10-03-20 11-09-20 12-07-27 12-09-19 12-11-12 08-10-01 10-04-01 11-10-01 12-07-28 12-09-20 12-11-13 [root@backup1 /data/www/daily]# </pre> So we see that everything up to July 2012 has been pruned. To prune July 2012 we do the following: <pre>mv 12-07-01 hold mv 12-07-10 hold mv 12-07-20 hold rm -fr 12-07* mv hold/* .</pre>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information