Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9065511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:31:10+00:00 2026-06-16T16:31:10+00:00

I am creating an automatic backup system. I plan on running a Cron Job

  • 0

I am creating an automatic backup system. I plan on running a Cron Job that will, once a week, automatically create a backup and email it to a secure email.(this way, even if the server explodes into a million pieces I will have a full recent backup of my files that any administrator can access)

I found this simple method: system('tar -cvzpf backup.tar.gz /path/to/folder');

It works nearly perfectly for what I need. Only problem is there is one directory that I do not want included in the backup. On this website, users upload their own avatars and the directory in which the images are held is inside the directory I want backed up. Because I’m sending this via email I have to keep the folder relatively small, and a couple thousand images add up. Is there any way I could tell the function to ignore this directory and just compress everything else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:31:11+00:00Added an answer on June 16, 2026 at 4:31 pm

    From the tar man:

     tar --exclude='/path/to/folder/bad' 
    

    So you would get:

    system('tar -czpf --exclude='/path/to/folder/bad'  backup.tar.gz /path/to/folder');
    

    You can leave the v (verbose) out, since you are not watching your code being executed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a backup system, where backups will be generated automaticly, so I will
I am creating a program that will automate some functions with Asana for my
I'm currently creating a lot of classes that will access database using a connection
I'm looking into creating a automated way to check the running version of our
Creating liquid layouts is an immense pain. Now, I totally understand that tables should
I have some PHP creating automatic Twitter updates, which in the small print at
I'm creating a HTML Component in Flex, loading a URL and then capturing that
I'm creating a function that takes a RichTextBox and has access to a list
I want to implement an automatic update system for a windows application. Right now
Possible Duplicate: How can I automatically add some skeleton code when creating a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.