CREATING YOUR OWN ATOM DEMO DATA SET
for re-use with Vagrant
What is Vagrant?
Vagrant is a tool for building complete
development environments. With an
easy-to-use workflow and focus on
automation, Vagrant lowers development
environment setup time, increases
development / production parity, and
makes the "works on my machine" excuse
a relic of the past.
Vagrant was started in January 2010 by
Mitchell Hashimoto.
https://www.vagrantup.com/about.html
Vagrant remains and always will be a liberally licensed open
source project. Each release of Vagrant is the work of hundreds
of individuals' contributions to the open source project.
What is VirtualBox?
VirtualBox is an open source, cross-platform
virtualization application.
When we describe VirtualBox as a "virtualization" product, we
refer to "full virtualization", that is, the particular kind of
virtualization that allows an unmodified operating system with
all of its installed software to run in a special environment, on
top of your existing operating system. This environment, called
a "virtual machine", is created by the virtualization software by
intercepting access to certain hardware components and
certain features. The physical computer is then usually called
the "host", while the virtual machine is often called a "guest".
Most of the guest code runs unmodified, directly on the host
computer, and the guest operating system "thinks" it's running
on a real machine.
https://www.virtualbox.org/wiki/Virtualization
The AtoM Vagrant Box
AtoM and all of its
dependencies….
Are packaged as a
Vagrant box…
Which is run by VirtualBox
as a virtual machine…
And accessed via SSH
and/or a web browser.
The AtoM Vagrant Box
The AtoM Vagrant box is an easy way to install
a test instance of AtoM on a local laptop or
personal computer, for testing, development,
and training.
Because the installation environment is
virtualized, you can install and run the AtoM
Vagrant box on almost any local operating
system (e.g. Windows, Mac, Linux, etc).
WARNING: The AtoM Vagrant box is NOT
intended to be used as a production
environment!
AtoM Vagrant Box Installation
Documentation
http://bit.ly/AtoM-Vagrant-docs
Slides
http://bit.ly/AtoM-Vagrant
BUT WE NEED SOME REUSABLE
FOR OUR TEST ENVIRONMENT!
https://pxhere.com/en/photo/1172040
Option 1: Create your own
AtoM Documentation
https://www.accesstomemory.org/docs/latest/
Use the documentation to guide
you as you create new records via
the user interface.
Option 2: Visit some public AtoM sites
AtoM Users
https://wiki.accesstomemory.org/Community/Users
Use the Clipboard and the various
export options to gather some
publicly accessible samples. Check
the AtoM documentation for
export and import instructions.
NOTE: If you intend to use or share this
data publicly, you should contact the site
admins for permission.
AtoM Vagrant database credentials
> nano config/config.php
Use CTRL+X to exit
Default credentials:
• Database name: atom
• Username: atom-user
• Password: ATOMPASSWORD
If you have changed these
defaults or simply want to
check the current credentials,
you will find them listed in
the config/config.php
configuration file.
Back up your database
> mysqldump -u atom-user -pATOMPASSWORD atom > /vagrant/atom2_demo.sql
This will copy the contents of your AtoM MySQL database to a
new database dump, called atom2_demo.sql. The file will be
located in the Vagrant installation directory on your host computer
– that is, the directory where you first ran the vagrant init
command when setting up the AtoM Vagrant box on your local
computer.
Back up your uploads directory
> cp -r /home/vagrant/atom/uploads/ /vagrant/
This will copy the contents of your AtoM uploads directory (digital
object uploads, repository logos and banners) to a new directory
called uploads in the Vagrant installation directory on your local
computer
Deleting your current data
> rm –rf /home/vagrant/atom/uploads
This will purge ALL data in the database, and create a new default
Admin user (username: demo, email: demo@example.com,
password: demo).
> php symfony tools:purge --demo
This will delete everything inside the current uploads directory.
Manually reloading your data
> rsync –av /vagrant/uploads/r /home/vagrant/atom/uploads
This will load the atom2_demo.sql database dump back into
your current AtoM database.
> mysql -u atom-user -pATOMPASSWORD atom < /vagrant/atom2_demo.sql
This will copy the contents of your local uploads directory into
the uploads directory in the AtoM Vagrant box.
Runing maintenance tasks
This will load the atom2_demo.sql database dump back into
your current AtoM database.
> php symfony digitalobject:regen-derivatives
> php symfony search:populate
> sudo systemctl restart php7.0-fpm
> sudo systemctl restart memcached
> sudo systemctl reload nginx
> sudo systemctl restart atom-worker
> php symfony cc
These commands will regenerate the digital object derivatives, re-
populate the search index, restart all services, and clear the
application cache.
https://i.ytimg.com/vi/qJehYddjLJ4/maxresdefault.jpg
Bash scripting to the rescue!
$_
http://onemillionskates.com/inside-edge/a-true-hero-dad-this-ones-for-you
Bash is a Unix shell and command
language written by Brian Fox for
the GNU Project as a free software
replacement for an older
command-line interface called the
Bourne shell. First released in 1989,
it has been distributed widely as
the default login shell for most
Linux distributions and Apple's
macOS (formerly OS X).
Bash scripting to the rescue!
Artefactual has prepared a simple bash script that will purge your current
environment, reload your data, and run the maintenance commands. Get
the script here: http://bit.ly/AtoM-bash
DANGER!!!
This script is provided AS
IS. Artefactual bears no
responsibility for any errors
or unexpected outcomes
caused by this script.
PROCEED AT YOUR OWN RISK
https://steemit.com/health/@kyusho/danger-will-robinson
Setting up the bash script
../atom-vagrant/ ← Wherever you’ve installed Vagrant
├── .vagrant ← The vagrant directory, created during set up
├── atom2_demo.sql ← The AtoM demo data database dump
├── uploads ← The AtoM demo data uploads directory
│ └── r ← Inside the uploads dir, the r dir
├── load-demo.sh ← The bash script
├── Vagrantfile ← The vagrantfile created when you set up Vagrant
Download and unzip the bash script, and place it
in your Vagrant installation directory – AKA
wherever you first ran the vagrant init
command on your local computer. It should be the
same place you now have your database dump
and uploads directory.
Make the script executable
> chmod +x /vagrant/load-demo.sh
This will make the script executable.
chmod is a Unix command used to manage filesystem permissions
– it’s short for “change mode.” The +x tells the filesystem to make
this file executable by all users.
Running the script
> /vagrant/load-demo.sh
Once you execute the script, remember:
• all your previous data will be purged and overwritten!
The script will spit out a bunch of lines as it runs through all of the
commands. Length of time will depend on how much data you have – as an
example, the AtoM public demo data takes about 5 minutes to fully refresh.
That’s it!
What does the script actually do?
php symfony tools:purge --demo
Run the tools:purge command with the demo option. Purge all current data, and create a
new demo user (demo@example.com, p: demo).
rm -rf /home/vagrant/atom/uploads
Recursively delete the current contents of the uploads directory in the AtoM vagrant box.
rsync -av /vagrant/uploads/r /home/vagrant/atom/uploads
Copy the contents of our fresh uploads directory into the AtoM Vagrant box using rsync.
mysql -u atom-user -pATOMPASSWORD -e 'drop database atom; create
database atom character set utf8 collate utf8_unicode_ci;'
Drop and recreate the AtoM database.
What does the script actually do?
mysql -u atom-user -pATOMPASSWORD atom < /vagrant/atom2_demo.sql
Load the AtoM demo database dump into the new AtoM database in Vagrant.
php symfony tools:upgrade-sql -B
Run the sql-upgrade task to make sure that the database schema is up to date.
php symfony digitalobject:regen-derivatives
Regenerate the digital object derivatives from the fresh master digital objects we have loaded.
php symfony search:populate
Repopulate the search index.
What does the script actually do?
sudo systemctl restart php7.0-fpm
Restart PHP-FPM.
sudo systemctl restart memcached
Restart memcached.
sudo systemctl reload nginx
Restart Nginx.
sudo systemctl restart atom-worker
Restart the atom-worker, used by the job scheduler for asynchronous tasks.
php symfony cc
Clear the application cache.
Troubleshooting the script
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace --> FOR DEBUGGING!
The # pound symbol comments out a line
in bash, so it is not executed.
If you uncomment the last line (and make
sure you remove the --> FOR
DEBUGGING! part too!), you can see how
the script runs step by step, which can be
useful for figuring out where something is
going wrong.
Note that in the script on line 6, there is a debug line, currently commented out:
QUESTIONS?
info@artefactual.com

More Related Content

PPTX
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
PDF
Installing and Upgrading AtoM
PPTX
AtoM's Command Line Tasks - An Introduction
PDF
Creating custom themes in AtoM
PDF
Get to Know AtoM's Codebase
PPT
Apache TomEE - Tomcat with a kick
PDF
Apache Tomcat + Java EE = Apache TomEE
PDF
Tomcat and apache httpd training
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
Installing and Upgrading AtoM
AtoM's Command Line Tasks - An Introduction
Creating custom themes in AtoM
Get to Know AtoM's Codebase
Apache TomEE - Tomcat with a kick
Apache Tomcat + Java EE = Apache TomEE
Tomcat and apache httpd training

What's hot (20)

PPTX
Dockerizing WordPress
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
PPT
Tomcat Configuration (1)
PDF
How to monitor and manage Apache Tomcat
PDF
Apache Tomcat 8 Application Server
PPTX
Composer | PHP Dependency Manager
PDF
Introduction to Apache Tomcat 7 Presentation
PDF
Tomcat tutorail
PPTX
Installing and running Postfix within a docker container from the command line
PPT
PPT
Tomcat Clustering
PDF
Getting Started with Docker
PDF
12 Composer #burningkeyboards
PDF
Vagrant + Docker provider [+Puppet]
PDF
Tomcat next
PPTX
Apache tomcat
PPTX
Controlling multiple VMs with the power of Python
PDF
InstallingRoRinLinux
PPTX
PHP Dependency Management with Composer
PPT
Professional deployment
Dockerizing WordPress
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Tomcat Configuration (1)
How to monitor and manage Apache Tomcat
Apache Tomcat 8 Application Server
Composer | PHP Dependency Manager
Introduction to Apache Tomcat 7 Presentation
Tomcat tutorail
Installing and running Postfix within a docker container from the command line
Tomcat Clustering
Getting Started with Docker
12 Composer #burningkeyboards
Vagrant + Docker provider [+Puppet]
Tomcat next
Apache tomcat
Controlling multiple VMs with the power of Python
InstallingRoRinLinux
PHP Dependency Management with Composer
Professional deployment
Ad

Similar to Creating your own AtoM demo data set for re-use with Vagrant (20)

PDF
Making environment for_infrastructure_as_code
DOCX
BLCN532 Lab 1Set up your development environmentV2.0.docx
PPTX
Extracting twitter data using apache flume
PDF
Security Testing Using Infrastructure-As-Code
PDF
Continuous Delivery: The Next Frontier
PPTX
Introduction to Docker
PDF
Server(less) Swift at SwiftCloudWorkshop 3
PPT
Jakarta struts
PDF
Getting started with puppet and vagrant (1)
PDF
Automated Amazon EC2 Cloud deployments with openQRM
PDF
Orangescrum In App Chat Add-on User Manual
PDF
OpenStack Murano introduction
PDF
Create Development and Production Environments with Vagrant
PDF
How to-simulate-network-devices
ODP
RichFaces - Testing on Mobile Devices
PPTX
DevOps Hackathon - Session 1: Vagrant
PDF
Quick & Easy Dev Environments with Vagrant
PDF
Drupalcamp es 2013 drupal with lxc docker and vagrant
PPTX
Activemq installation and master slave setup using shared broker data
PDF
Mc sl54 051_ (1)
Making environment for_infrastructure_as_code
BLCN532 Lab 1Set up your development environmentV2.0.docx
Extracting twitter data using apache flume
Security Testing Using Infrastructure-As-Code
Continuous Delivery: The Next Frontier
Introduction to Docker
Server(less) Swift at SwiftCloudWorkshop 3
Jakarta struts
Getting started with puppet and vagrant (1)
Automated Amazon EC2 Cloud deployments with openQRM
Orangescrum In App Chat Add-on User Manual
OpenStack Murano introduction
Create Development and Production Environments with Vagrant
How to-simulate-network-devices
RichFaces - Testing on Mobile Devices
DevOps Hackathon - Session 1: Vagrant
Quick & Easy Dev Environments with Vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
Activemq installation and master slave setup using shared broker data
Mc sl54 051_ (1)
Ad

More from Artefactual Systems - AtoM (20)

PDF
Artefactual AtoM Priorities November 2024
PPTX
CSV import in AtoM
PPTX
Things I wish I'd known - AtoM tips, tricks, and gotchas
PDF
AtoM Community Update: 2019-05
PPTX
Searching in AtoM
PPTX
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
PPTX
AtoM Implementations
PPTX
AtoM Data Migrations
PPTX
Looking Ahead: AtoM's governance, development, and future
PPTX
Contributing to the AtoM documentation
PDF
Installing AtoM with Ansible
PDF
AtoM feature development
PDF
Constructing SQL queries for AtoM
PPTX
Command-Line 101
PPTX
An Introduction to AtoM, Archivematica, and Artefactual Systems
PDF
National Archives of Norway - AtoM and Archivematica intro workshop
PPTX
Introducing Access to Memory
PPTX
Artefactual and Open Source Development
PPTX
AtoM, Authenticity, and the Chain of Custody
PPTX
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...
Artefactual AtoM Priorities November 2024
CSV import in AtoM
Things I wish I'd known - AtoM tips, tricks, and gotchas
AtoM Community Update: 2019-05
Searching in AtoM
Building the Future Together: AtoM3, Governance, and the Sustainability of Op...
AtoM Implementations
AtoM Data Migrations
Looking Ahead: AtoM's governance, development, and future
Contributing to the AtoM documentation
Installing AtoM with Ansible
AtoM feature development
Constructing SQL queries for AtoM
Command-Line 101
An Introduction to AtoM, Archivematica, and Artefactual Systems
National Archives of Norway - AtoM and Archivematica intro workshop
Introducing Access to Memory
Artefactual and Open Source Development
AtoM, Authenticity, and the Chain of Custody
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...

Recently uploaded (20)

PDF
MaterialX Virtual Town Hall - August 2025
PDF
KidsTale AI Review - Create Magical Kids’ Story Videos in 2 Minutes.pdf
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
PPTX
SQL introduction and commands, SQL joining
PPTX
Greedy best-first search algorithm always selects the path which appears best...
PDF
C language slides for c programming book by ANSI
PDF
10 Mistakes Agile Project Managers Still Make
PPTX
TRAVEL SUPPLIER API INTEGRATION | XML BOOKING ENGINE
PDF
OpenColorIO Virtual Town Hall - August 2025
PPTX
Hexagone difital twin solution in the desgining
PDF
How to Write Automated Test Scripts Using Selenium.pdf
PDF
DOWNLOAD—IOBit Uninstaller Pro Crack Download Free
PDF
OpenImageIO Virtual Town Hall - August 2025
PDF
Difference Between Website and Web Application.pdf
PDF
IObit Driver Booster Pro Crack Latest Version Download
PPTX
Presentation - Summer Internship at Samatrix.io_template_2.pptx
PPTX
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
PPTX
AI Tools Revolutionizing Software Development Workflows
PDF
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
PPTX
opentower introduction and the digital twin
MaterialX Virtual Town Hall - August 2025
KidsTale AI Review - Create Magical Kids’ Story Videos in 2 Minutes.pdf
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
SQL introduction and commands, SQL joining
Greedy best-first search algorithm always selects the path which appears best...
C language slides for c programming book by ANSI
10 Mistakes Agile Project Managers Still Make
TRAVEL SUPPLIER API INTEGRATION | XML BOOKING ENGINE
OpenColorIO Virtual Town Hall - August 2025
Hexagone difital twin solution in the desgining
How to Write Automated Test Scripts Using Selenium.pdf
DOWNLOAD—IOBit Uninstaller Pro Crack Download Free
OpenImageIO Virtual Town Hall - August 2025
Difference Between Website and Web Application.pdf
IObit Driver Booster Pro Crack Latest Version Download
Presentation - Summer Internship at Samatrix.io_template_2.pptx
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
AI Tools Revolutionizing Software Development Workflows
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
opentower introduction and the digital twin

Creating your own AtoM demo data set for re-use with Vagrant

  • 1. CREATING YOUR OWN ATOM DEMO DATA SET for re-use with Vagrant
  • 2. What is Vagrant? Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development / production parity, and makes the "works on my machine" excuse a relic of the past. Vagrant was started in January 2010 by Mitchell Hashimoto. https://www.vagrantup.com/about.html Vagrant remains and always will be a liberally licensed open source project. Each release of Vagrant is the work of hundreds of individuals' contributions to the open source project.
  • 3. What is VirtualBox? VirtualBox is an open source, cross-platform virtualization application. When we describe VirtualBox as a "virtualization" product, we refer to "full virtualization", that is, the particular kind of virtualization that allows an unmodified operating system with all of its installed software to run in a special environment, on top of your existing operating system. This environment, called a "virtual machine", is created by the virtualization software by intercepting access to certain hardware components and certain features. The physical computer is then usually called the "host", while the virtual machine is often called a "guest". Most of the guest code runs unmodified, directly on the host computer, and the guest operating system "thinks" it's running on a real machine. https://www.virtualbox.org/wiki/Virtualization
  • 4. The AtoM Vagrant Box AtoM and all of its dependencies…. Are packaged as a Vagrant box… Which is run by VirtualBox as a virtual machine… And accessed via SSH and/or a web browser.
  • 5. The AtoM Vagrant Box The AtoM Vagrant box is an easy way to install a test instance of AtoM on a local laptop or personal computer, for testing, development, and training. Because the installation environment is virtualized, you can install and run the AtoM Vagrant box on almost any local operating system (e.g. Windows, Mac, Linux, etc). WARNING: The AtoM Vagrant box is NOT intended to be used as a production environment!
  • 6. AtoM Vagrant Box Installation Documentation http://bit.ly/AtoM-Vagrant-docs Slides http://bit.ly/AtoM-Vagrant
  • 7. BUT WE NEED SOME REUSABLE FOR OUR TEST ENVIRONMENT! https://pxhere.com/en/photo/1172040
  • 8. Option 1: Create your own AtoM Documentation https://www.accesstomemory.org/docs/latest/ Use the documentation to guide you as you create new records via the user interface.
  • 9. Option 2: Visit some public AtoM sites AtoM Users https://wiki.accesstomemory.org/Community/Users Use the Clipboard and the various export options to gather some publicly accessible samples. Check the AtoM documentation for export and import instructions. NOTE: If you intend to use or share this data publicly, you should contact the site admins for permission.
  • 10. AtoM Vagrant database credentials > nano config/config.php Use CTRL+X to exit Default credentials: • Database name: atom • Username: atom-user • Password: ATOMPASSWORD If you have changed these defaults or simply want to check the current credentials, you will find them listed in the config/config.php configuration file.
  • 11. Back up your database > mysqldump -u atom-user -pATOMPASSWORD atom > /vagrant/atom2_demo.sql This will copy the contents of your AtoM MySQL database to a new database dump, called atom2_demo.sql. The file will be located in the Vagrant installation directory on your host computer – that is, the directory where you first ran the vagrant init command when setting up the AtoM Vagrant box on your local computer.
  • 12. Back up your uploads directory > cp -r /home/vagrant/atom/uploads/ /vagrant/ This will copy the contents of your AtoM uploads directory (digital object uploads, repository logos and banners) to a new directory called uploads in the Vagrant installation directory on your local computer
  • 13. Deleting your current data > rm –rf /home/vagrant/atom/uploads This will purge ALL data in the database, and create a new default Admin user (username: demo, email: [email protected], password: demo). > php symfony tools:purge --demo This will delete everything inside the current uploads directory.
  • 14. Manually reloading your data > rsync –av /vagrant/uploads/r /home/vagrant/atom/uploads This will load the atom2_demo.sql database dump back into your current AtoM database. > mysql -u atom-user -pATOMPASSWORD atom < /vagrant/atom2_demo.sql This will copy the contents of your local uploads directory into the uploads directory in the AtoM Vagrant box.
  • 15. Runing maintenance tasks This will load the atom2_demo.sql database dump back into your current AtoM database. > php symfony digitalobject:regen-derivatives > php symfony search:populate > sudo systemctl restart php7.0-fpm > sudo systemctl restart memcached > sudo systemctl reload nginx > sudo systemctl restart atom-worker > php symfony cc These commands will regenerate the digital object derivatives, re- populate the search index, restart all services, and clear the application cache.
  • 17. Bash scripting to the rescue! $_ http://onemillionskates.com/inside-edge/a-true-hero-dad-this-ones-for-you Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for an older command-line interface called the Bourne shell. First released in 1989, it has been distributed widely as the default login shell for most Linux distributions and Apple's macOS (formerly OS X).
  • 18. Bash scripting to the rescue! Artefactual has prepared a simple bash script that will purge your current environment, reload your data, and run the maintenance commands. Get the script here: http://bit.ly/AtoM-bash
  • 19. DANGER!!! This script is provided AS IS. Artefactual bears no responsibility for any errors or unexpected outcomes caused by this script. PROCEED AT YOUR OWN RISK https://steemit.com/health/@kyusho/danger-will-robinson
  • 20. Setting up the bash script ../atom-vagrant/ ← Wherever you’ve installed Vagrant ├── .vagrant ← The vagrant directory, created during set up ├── atom2_demo.sql ← The AtoM demo data database dump ├── uploads ← The AtoM demo data uploads directory │ └── r ← Inside the uploads dir, the r dir ├── load-demo.sh ← The bash script ├── Vagrantfile ← The vagrantfile created when you set up Vagrant Download and unzip the bash script, and place it in your Vagrant installation directory – AKA wherever you first ran the vagrant init command on your local computer. It should be the same place you now have your database dump and uploads directory.
  • 21. Make the script executable > chmod +x /vagrant/load-demo.sh This will make the script executable. chmod is a Unix command used to manage filesystem permissions – it’s short for “change mode.” The +x tells the filesystem to make this file executable by all users.
  • 22. Running the script > /vagrant/load-demo.sh Once you execute the script, remember: • all your previous data will be purged and overwritten! The script will spit out a bunch of lines as it runs through all of the commands. Length of time will depend on how much data you have – as an example, the AtoM public demo data takes about 5 minutes to fully refresh. That’s it!
  • 23. What does the script actually do? php symfony tools:purge --demo Run the tools:purge command with the demo option. Purge all current data, and create a new demo user ([email protected], p: demo). rm -rf /home/vagrant/atom/uploads Recursively delete the current contents of the uploads directory in the AtoM vagrant box. rsync -av /vagrant/uploads/r /home/vagrant/atom/uploads Copy the contents of our fresh uploads directory into the AtoM Vagrant box using rsync. mysql -u atom-user -pATOMPASSWORD -e 'drop database atom; create database atom character set utf8 collate utf8_unicode_ci;' Drop and recreate the AtoM database.
  • 24. What does the script actually do? mysql -u atom-user -pATOMPASSWORD atom < /vagrant/atom2_demo.sql Load the AtoM demo database dump into the new AtoM database in Vagrant. php symfony tools:upgrade-sql -B Run the sql-upgrade task to make sure that the database schema is up to date. php symfony digitalobject:regen-derivatives Regenerate the digital object derivatives from the fresh master digital objects we have loaded. php symfony search:populate Repopulate the search index.
  • 25. What does the script actually do? sudo systemctl restart php7.0-fpm Restart PHP-FPM. sudo systemctl restart memcached Restart memcached. sudo systemctl reload nginx Restart Nginx. sudo systemctl restart atom-worker Restart the atom-worker, used by the job scheduler for asynchronous tasks. php symfony cc Clear the application cache.
  • 26. Troubleshooting the script set -o errexit set -o nounset set -o pipefail # set -o xtrace --> FOR DEBUGGING! The # pound symbol comments out a line in bash, so it is not executed. If you uncomment the last line (and make sure you remove the --> FOR DEBUGGING! part too!), you can see how the script runs step by step, which can be useful for figuring out where something is going wrong. Note that in the script on line 6, there is a debug line, currently commented out: