• Announcements

    • MannDude

      Current state of vpsBoard   02/04/2017

      Dear vpsBoard members and guests:

      Over the last year or two vpsBoard activity and traffic has dwindled. I have had a change of career and interests, and as such am no longer an active member of the web hosting industry.

      Due to time constraints and new interests I no longer wish to continue to maintain vpsBoard. The web site will remain only as an archive to preserve and showcase some of the great material, guides, and industry news that has been generated by members, some of which I remain in contact to this very day and now regard as personal friends.

      I want to thank all of our members who helped make vpsBoard the fastest growing industry forum. In it's prime it was an active and ripe source of activity, news, guides and just general off-topic banter and fun.

      I wish all members and guests the very best, whether it be with your business or your personal projects.

      -MannDude
MannDude

How do you exclude a sub-directory via bash?

2 posts in this topic

For example, say you want to create an archive of a directory to back it up:

tar -zcf /some/backup/folder/yoursite_www_$(date +"%m_%d-%Y_%H:%M").tar.gz /home/someuser/somesite/public_html

So that'll create an an archive of everything located in /home/someuser/somesite/public_html. Great. But what if you have a folder with large files in it that you want to exclude from being backed up? For example: /home/someuser/somesite/public_html/bigfiles ? How would you exclude that from being archived?

Share this post


Link to post
Share on other sites

Good answer: man tar

(or, if you're looking for a replacement for bash wildcard matching that supports exclusion, use find)

Bad answer:

tar -zcf /some/backup/folder/yoursite_www_$(date +"%m_%d-%Y_%H:%M").tar.gz --exclude=bigfiles /home/someuser/somesite/public_html

 

Edited by perennate

Share this post


Link to post
Share on other sites

  • Similar Content

    • By VATruica
      I've been using the DO API to automate some things like 
      VPS reboot and snapshoot adding DNS records to configure email with Zoho You can find the scripts on my github. Feel free to fork away / come with other examples / use cases that you've automated or need automation.
       
       
    • By TurnkeyInternet
      Introducing TurnKey Vault : the next-generation online backup solution that offers ease of use combined with comprehensive enterprise-class backup and disaster recovery features designed for any server, pc, laptop or database located anywhere in the world. 10 GB Account Free for Life Sign Up  
      TurnKey Vault is the next-generation in Cloud Backup technology - enabling you to protect your most valuable asset - your data. Secure and protect your data in the TurnKey Vault with SSAE16 certification and offering a HIPAA/PCI compliant backup solution that uses military-grade encryption and offers the simplified ease of use that comes with the TurnKey brand.
      TurnKey Vault fills the void that exists with typical online backup solutions, by offering true business continuity disaster recovery (BCDR) through next-generation Virtual Disaster Recovery combined with live cloud replication to provide instant recovery to businesses by restoring any server, PC, or laptop into a cloud-based virtual private server that is accessible via the Internet.
      Unlimited devices at no charge - if you are backing up 1 desktop PC or server, or backing up an entire datacenter of servers, our simplified data storage pricing model avoids expensive per device licensing models of other popular backup services.  

      TurnKey Vault Secure Cloud Backup Features and Support Include:



      10 GB Account Free for Life : Sign Up - no credit card required!
      Securely Backup Desktops & Servers
      Backup both physical and virtual servers
      Bare metal Restore
      Live Cloud Replication
      Virtual Disaster Recovery
      Linux / Windows / Mac OS / VMware
      Windows XP, Vista, 7, 8, Win Server 2003/2008/2012
      Physical To Virtual (P2V)
      Advanced Scheduling
      Archiving
      Pre/Post Backup Actions
      Backup Priorities
      Email Notifications
      Unlimited Devices
      System State
      Microsoft Exchange
      Hyper-V
      Sharepoint
      MSSQL Database
      Military-grade Encryption
      MySQL Database
      Network Shares
      Oracle Database

      For more information on TurnKey Vault:  How it works | Compare | FAQ | Sign Up

      TurnKey Vault is the only solution to combine this unlimited device pricing model with next-generation disaster recovery and backup features like bare metal recovery, cloud replication, Linux, Windows and Mac operating system support, encrypted data protection, enterprise database backups for Oracle, MSSQL and MySQL, and much more!

      Why TurnKey Vault vs Other Backup Solutions?  Compare
      What makes TurnKey Vault the absolute best Cloud Backup solution on the market is our system was built from the ground up with business users in mind. From encryption so strong that even we can't see your data, to the most advanced features on the market - like Live Cloud Replication, bare metal recovery and the ability to restore a server, PC or even an entire office of computers, live, in real-time, into a fully functional, cloud-based virtual environment accessible from anywhere over the Internet.

      Resellers / Agents / Affiliates : sign up as a partner and offer white label backup solutions to your customers with huge margins and profit.


      TurnKey Vault is a fully owned and operated subsidiary of TurnKey Internet, Inc. specializing in secure online backup services.
       
      About TurnKey Internet:
      All servers and services are hosted in our company-owned and operated, ENERGY STAR certified,  green data center in New York’s Tech Valley Region. Alternative technologies such as on-site solar power generation, cold containment pods, hydroelectricity, and SmartAisle cooling have eliminated our carbon footprint entirely, and made us the best of the best for energy efficiency nation-wide.
      Since 1999, TurnKey Internet has built a reputation of outstanding personalized service, reliability, and value.  TurnKey is dedicated to success every step of the way.  TurnKey maintains an A+ rating from the Better Business Bureau, is SSAE 16 Type 2 certified, ENERGY STAR certified, and the winner of the 2012 Excellence in Small Business Award from the U.S. Small Business Administration. We are experts in the cloud hosting and data center space, and are here to support you for any and all of your hosting needs.
      Don't just take our word for it - view these Verified Client Testimonials and our 5-star, perfect rating from Shopper Approved.

      CONTACT US:
      Live Chat: Live Sales Chat
      Email: [email protected]
      Web: www.turnkeyinternet.net
      Facebook: Turnkey Internet
      Twitter: @TurnKeyInternet
       
    • By TurnkeyInternet
      LATHAM, NEW YORK (September 22nd, 2015) – Sustainable IT solutions provider TurnKey Internet, Inc. announced today the launch of their TurnKey Vault Secure Cloud Backup service. The all new product delivers next-generation online backup services focused on business continuity and disaster recovery (BCDR) to individuals, businesses and large scale organizations across the globe.

      TurnKey Vault offers next-generation backup technology including bare metal recovery, Linux, Windows and Mac operating system support, encrypted data protection, as well as backups for enterprise databases such as Oracle, MSSQL and MySQL. TurnKey Vault fills the void that exists with typical online backup solutions, by offering true business continuity disaster recovery (BCDR) through next-generation Virtual Disaster Recovery combined with live cloud replication to provide instant recovery to businesses by restoring any server, PC, or laptop into a cloud-based virtual private server that is accessible via the Internet.

      TurnKey Vault’s live cloud replication allows instant restoration of your operating system, files, configuration, registry files, software programs, licenses, and everything to bring your laptop, PC, or server back into full production without any additional hardware or IT staff. Your fully restored cloud-based server, PC or laptop is cloud-ready and accessible via the Internet via any mobile phone, tablet, PC using remote desktop protocols or any web browser to access your entire system.

      ”Data loss is a reality – you are more likely to lose your business data in the next 7 years than get audited by the IRS.” said Adam Wills, CEO of TurnKey Internet. He continued, “The reality of the current generation backup solutions out there is that it’s not enough to just backup your data and hope to put the pieces back together after disaster strikes- that can lead to countless days or weeks of lost business productivity and expensive IT support staff time. With our TurnKey Vault technology combined with our cloud-based datacenter services, we can literally restore an entire office building of lost servers and PCs back into fully accessible and functional copies so your business can get back up and running fast.”
      TurnKey Vault offers a free for life 10 GB plan with all enterprise features enabled and a reseller system for VAR’s and channel partners to offer private label branded Secure Cloud Backup services to an unlimited number of clients or devices. For more information visit https://TurnKeyVault.com.

      About Turnkey Internet
      Founded in 1999, TurnKey Internet, Inc. is a full-service green data center and leading provider of sustainable web hosting and IT solutions. From its SSAE 16 Type 2 and ENERGY STAR® certified facility in Latham, NY—New York's Tech Valley Region—TurnKey offers cloud-based hosted services, web hosting, communication services, web-based IT systems, software as a service (SaaS), enterprise colocation services, and computing as a service to clients in more than 150 countries. For more information, please call (518) 618-0999 or visit www.turnkeyinternet.net/media.
    • By Scopehosts
      Hello all ,    Just want the views of all webmasters which backup solution are you preferring for your hosting services like   VPS Dedicated Servers Shared Hosting   Software or hardware Backup solutions? which would be your most preferable one?
    • By cociu
      as the title says ...if you search for a backup vps how many space you need ?